public function getDirectories() : array
    {
        if(!$this->_isLoaded) {
            $this->load();
        }

        return array_map(function($directory) {
            return new Directory($this->getPath(). DIRECTORY_SEPARATOR .$directory);
        }, $this->_directories);
    }
public function getDirectories() : array
    {
        if(!$this->_isLoaded) {
            $this->load();
        }

        return array_map(function($directory) {
            return new Directory($this->getPath(). DIRECTORY_SEPARATOR .$directory);
        }, $this->_directories);
    }
public function getDirectories ( ) : array { if ( ! $ this -> _isLoaded ) { $ this -> load ( ) ; } return array_map ( function ( $ directory ) { return new Directory ( $ this -> getPath ( ) . DIRECTORY_SEPARATOR . $ directory ) ; } , $ this -> _directories ) ; }
Returns an array with all directories of the directory.

@return Directory[] Array with `\Alexya\FileSystem\Directory` objects for each directory on the directory.
Returns an array with all directories of the directory .