Created
April 11, 2016 15:51
-
-
Save YuriyNasretdinov/2f6d12dae627b0b27cee4c8af7f97def to your computer and use it in GitHub Desktop.
Revisions
-
YuriyNasretdinov created this gist
Apr 11, 2016 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,21 @@ <?php function doFind($dir) { $dh = opendir($dir); if (!$dh) die("Could not open $dir\n"); while (false !== ($f = readdir($dh))) { if ($f === '.' || $f === '..') continue; $path = $dir . '/' . $f; echo $path . "\n"; if (is_dir($path) && !is_link($path)) { doFind($path); } } closedir($dh); } ob_start(); doFind($argv[1]); ob_end_flush();