public function lsDirs(string $path = '') : array
    {
        return array_filter(
            $this->ls($path),
            function(File $file) {
                return $file->isDir();
            }
        );
    }
public function lsDirs(string $path = '') : array
    {
        return array_filter(
            $this->ls($path),
            function(File $file) {
                return $file->isDir();
            }
        );
    }
public function lsDirs ( string $ path = '' ) : array { return array_filter ( $ this -> ls ( $ path ) , function ( File $ file ) { return $ file -> isDir ( ) ; } ) ; }
Return list of directories in given path.

@param  string $path
@return array
@throws \Exception
Return list of directories in given path .