Changeset View
Changeset View
Standalone View
Standalone View
src/filesystem/FileFinder.php
Context not available. | |||||
private function getFiles($dir) { | private function getFiles($dir) { | ||||
$found = Filesystem::listDirectory($this->root.'/'.$dir, true); | $found = Filesystem::listDirectory($this->root.'/'.$dir, true); | ||||
$files = array(); | $files = array(); | ||||
if (strlen($dir) > 0) { | if (@strlen($dir) > 0) { | ||||
$dir = rtrim($dir, '/').'/'; | $dir = rtrim($dir, '/').'/'; | ||||
} | } | ||||
foreach ($found as $filename) { | foreach ($found as $filename) { | ||||
Context not available. | |||||
->resolvex(); | ->resolvex(); | ||||
$stdout = trim($stdout); | $stdout = trim($stdout); | ||||
if (!strlen($stdout)) { | if (!@strlen($stdout)) { | ||||
return array(); | return array(); | ||||
} | } | ||||
$files = explode("\0", $stdout); | $files = @explode("\0", $stdout); | ||||
// On OSX/BSD, find prepends a './' to each file. | // On OSX/BSD, find prepends a './' to each file. | ||||
foreach ($files as $key => $file) { | foreach ($files as $key => $file) { | ||||
Context not available. | |||||
continue; | continue; | ||||
} | } | ||||
if (substr($files[$key], 0, 2) == './') { | if (@substr($files[$key], 0, 2) == './') { | ||||
$files[$key] = substr($files[$key], 2); | $files[$key] = @substr($files[$key], 2); | ||||
} | } | ||||
} | } | ||||
} | } | ||||
Context not available. |
Content licensed under Creative Commons Attribution-ShareAlike 4.0 (CC-BY-SA) unless otherwise noted; code licensed under Apache 2.0 or other open source licenses. · CC BY-SA 4.0 · Apache 2.0