method scan documentation in bbn\File\Ftp

Scans all the content from a directory, including the subdirectories

bbn\File\Dir::scan("/home/me"); bbn\File\Dir::delete("C:\Documents\Test");

function(string $dir, string $type = NULL, &$res = [], int $timeout = 0) { $res = []; if ( $dirs = $this->listFiles($dir) ){ foreach ( $dirs as $d ){ if ( $type && (strpos($type, 'file') === 0) && !isset($d['num']) ){ $res[] = $d['name']; } else if ( $type && ((strpos($type, 'dir') === 0) || (strpos($type, 'fold') === 0)) && isset($d['num']) ){ $res[] = $d['name']; } else{ $res[] = $d['name']; } if ( isset($d['num']) ){ $this->scan($d['name'], $type, $res); } } } return $res; }

Scans all the content from a directory, including the subdirectories BBN is a suite of PHP and JS libraries and VueJS components - all open-source! bbn.io, build applications, the quick way

This website uses cookies to ensure you get the best experience on our website.