mehrdad-dadkhah/php-file-finder

simple package to search files and directories and return full path and related information

1.1.3 2018-02-04 06:02 UTC

This package is auto-updated.

Last update: 2024-04-22 17:35:59 UTC


README

Software License Packagist Version

simple package to find file or directory full path and related information in php

Installation

composer require mehrdad-dadkhah/php-file-finder

Usage

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', '/');

License

hls-video-generater is licensed under the GPLv3 License.