Created
June 19, 2012 03:33
-
-
Save barlino/2952146 to your computer and use it in GitHub Desktop.
use PHP5 for scanning directories recursively
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<? | |
$dir = new RecursiveIteratorIterator( | |
new RecursiveDirectoryIterator('/tmp'), true); | |
foreach ( $dir as $file ) { | |
echo str_repeat("--", $dir->getDepth()) . " $file\n"; | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment