PHP Classes

PHP File Explorer: Find files that match a given criteria in a folder

Recommend this page to a friend!

  Author Author  
Picture of DeGraciaMathieu
Name: DeGraciaMathieu <contact>
Classes: 13 packages by
Country: France France
Innovation award
Innovation award
Nominee: 8x


  Detailed description   Download Download .zip .tar.gz  
This package can find files that match the given criteria in a folder.

It can scan a folder recursively to search for files that match a given file name extension.

It can also exclude specific files with names that match a regular expression

The package can return an array of files that match the criteria.

Details

PHP Composer packagist) packagist)

php-file-explorer

Code extracted from bmitch/churn-php

Usage

$fileFinder = new FileFinder(
    fileExtensions: ['php'], 
    filesToIgnore: [], 
    basePath: __DIR__,
);

$files = $fileFinder->getFiles(paths: [
   __DIR__,
]);

foreach ($files as $file) {
   $file->getFullPath();
   $file->getDisplayPath();
}

Tests

make test
make coverage

  Classes of DeGraciaMathieu  >  PHP File Explorer  >  Download Download .zip .tar.gz  >  Support forum Support forum  >  Blog Blog  >  RSS 1.0 feed RSS 2.0 feed Latest changes  
Name: PHP File Explorer
Base name: php-file-explorer
Description: Find files that match a given criteria in a folder
Version: -
PHP version: 5
License: The PHP License
 
  Groups   Applications   Files Files  

  Groups  
Group folder image PHP 5 Classes using PHP 5 specific features View top rated classes
Group folder image Files and Folders Listing, accessing and manipulating files and folders View top rated classes
Group folder image Searching Search engines, crawling and indexing View top rated classes


  Applications that use this package  
No pages of applications that use this class were specified.

Add link image If you know an application of this package, send a message to the author to add a link here.

  Files folder image Files  
File Role Description
Files folder image.github (1 directory)
Files folder imagesrc (3 files)
Files folder imagetests (1 directory)
Accessible without login Plain text file composer.json Data Auxiliary data
Accessible without login Plain text file Makefile Data Auxiliary data
Accessible without login Plain text file phpunit.xml Data Auxiliary data
Accessible without login Plain text file README.md Doc. Documentation

  Files folder image Files  /  .github  
File Role Description
Files folder imageworkflows (1 file)

  Files folder image Files  /  .github  /  workflows  
File Role Description
  Accessible without login Plain text file build.yml Data Auxiliary data

  Files folder image Files  /  src  
File Role Description
  Plain text file File.php Class Class source
  Plain text file FileFinder.php Class Class source
  Plain text file FileHelper.php Class Class source

  Files folder image Files  /  tests  
File Role Description
Files folder imageUnit (3 files, 2 directories)

  Files folder image Files  /  tests  /  Unit  
File Role Description
Files folder imageAssets (4 files)
Files folder imageAssets2 (2 files, 1 directory)
  Plain text file FileFinderTest.php Class Class source
  Plain text file FileHelperTest.php Class Class source
  Plain text file FileTest.php Class Class source

  Files folder image Files  /  tests  /  Unit  /  Assets  
File Role Description
  Plain text file Bar.php Class Class source
  Plain text file Baz.php Class Class source
  Plain text file Foo.php Class Class source
  Plain text file Qux.inc Class Class source

  Files folder image Files  /  tests  /  Unit  /  Assets2  
File Role Description
Files folder imageDeepAssets (3 files)
  Plain text file Foo2.php Class Class source
  Plain text file Qux2.inc Class Class source

  Files folder image Files  /  tests  /  Unit  /  Assets2  /  DeepAssets  
File Role Description
  Plain text file Deep.php Class Class source
  Plain text file Deep2.php Class Class source
  Plain text file Different.php Class Class source

Download Download all files: php-file-explorer.tar.gz php-file-explorer.zip
NOTICE: if you are using a download manager program like 'GetRight', please Login before trying to download this archive.
  Files folder image Files  
File Role Description
Files folder image.github (1 directory)
Files folder imagesrc (3 files)
Files folder imagetests (1 directory)
Accessible without login Plain text file composer.json Data Auxiliary data
Accessible without login Plain text file Makefile Data Auxiliary data
Accessible without login Plain text file phpunit.xml Data Auxiliary data
Accessible without login Plain text file README.md Doc. Documentation

  Files folder image Files  /  .github  
File Role Description
Files folder imageworkflows (1 file)

  Files folder image Files  /  .github  /  workflows  
File Role Description
  Accessible without login Plain text file build.yml Data Auxiliary data

  Files folder image Files  /  src  
File Role Description
  Plain text file File.php Class Class source
  Plain text file FileFinder.php Class Class source
  Plain text file FileHelper.php Class Class source

  Files folder image Files  /  tests  
File Role Description
Files folder imageUnit (3 files, 2 directories)

  Files folder image Files  /  tests  /  Unit  
File Role Description
Files folder imageAssets (4 files)
Files folder imageAssets2 (2 files, 1 directory)
  Plain text file FileFinderTest.php Class Class source
  Plain text file FileHelperTest.php Class Class source
  Plain text file FileTest.php Class Class source

  Files folder image Files  /  tests  /  Unit  /  Assets  
File Role Description
  Plain text file Bar.php Class Class source
  Plain text file Baz.php Class Class source
  Plain text file Foo.php Class Class source
  Plain text file Qux.inc Class Class source

  Files folder image Files  /  tests  /  Unit  /  Assets2  
File Role Description
Files folder imageDeepAssets (3 files)
  Plain text file Foo2.php Class Class source
  Plain text file Qux2.inc Class Class source

  Files folder image Files  /  tests  /  Unit  /  Assets2  /  DeepAssets  
File Role Description
  Plain text file Deep.php Class Class source
  Plain text file Deep2.php Class Class source
  Plain text file Different.php Class Class source

Download Download all files: php-file-explorer.tar.gz php-file-explorer.zip
NOTICE: if you are using a download manager program like 'GetRight', please Login before trying to download this archive.