simple package to find file or directory full path and related information in php
composer require mehrdad-dadkhah/php-file-finder
use MehrdadDadkhah\File\Finder;
$finder = new Finder();
can change finder, default is find
and can change it to locate
$finder->setFinder('locate');
find with filename and search all directories:
$finder->findFile('myFile.mp4', '/');
find all video(mp4) files in /home dir:
$finder->findFile('*.mp4', '/home');
find a file with it's related path:
$finder->findFile('related/path/to/files/myFile.mp4');
find files and only return file path without extra information:
$finder->findFile('myFile.mp4', '/', false);
find directory with name test:
$finder->findDirectoryPath('test', '/');
hls-video-generater is licensed under the GPLv3 License.