method getDirs documentation in bbn\File\Dir

Return an array of directories contained in the given directory.

It will return directories' full path.

function($dir, $hidden = false) { clearstatcache(); if ( $dir === './' ){ $dir = '.'; } if ( is_dir($dir) && (($dir === '.') || ((strpos(X::basename($dir), '.') !== 0) || $hidden)) ){ $dirs = []; $fs = scandir($dir, SCANDIR_SORT_ASCENDING ); foreach ( $fs as $f ){ if ( $f !== '.' && $f !== '..' && is_dir($dir.'/'.$f) ){ $dirs[] = self::cur($dir.'/').$f; } } if ( !empty($dirs) ){ bbn\X::sort($dirs); } return $dirs; } return false; }

Return an array of directories contained in the given directory. 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.