Skip to content

Mehrdad-Dadkhah/php-file-finder

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

php-file-finder

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.

About

find file or directory full path and information in php

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages