Get started

Requirements

Path-PHP requires PHP 8.0 or ulterior versions.

Installation

Install with composer :

composer require olinox14/path-php

Usage

Then, just import the Path class :

<?php
use Path\Path;

$path = new Path(__file__);

$dir = $path->parent();

foreach ($dir->files() as $file) {
    if ($file->ext() === 'html') {
        $file->rename($file->name() . '.md');
    }
}