Files_DirectoryListing


Class_dir class browse and return files and directories list from dedicated parameters. To test it, we share you a file selection. Generated code will be prompt after and show the easy way to use class_dir.

The following form will allow you to test the basic work of this class

Test file list

To test Files_DirectoryListing class usage, you could use the following file list :

  • /var/www/subfolder_txt
  • /exemple.txt
    Last acces the :
    2007-08-11
    Last update the :
    2008-03-03
  • /var/www
  • /index.css
    Last acces the :
    2006-08-02
    Last update the :
    2008-03-03
  • /logo.gif
    Last acces the :
    2004-11-26
    Last update the :
    2008-03-03
  • /logo.jpg
    Last acces the :
    2004-03-17
    Last update the :
    2008-03-03
  • /without_ext
    Last acces the :
    2005-12-27
    Last update the :
    2008-03-03

Test the Files_DirectoryListing file

Selected extensions
Include files without extension ?
Last acces the
Last update the
With subfolders too ?

Yours results

<?php
$dir
= new Files_DirectoryListing('/var/www');
$files = $dir->LIST_files('');
foreach(
$files as $currentFile) {
    echo
"$currentFile\n";
};
unset($files);
unset(
$dir);
?>
Will retrieve:
/var/www/index.css
/var/www/logo.gif
/var/www/logo.jpg
/var/www/without_ext
Languages
Available
FrancaisEnglish