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

        return array_map(function($file) {
            return new File($this->getPath(). DIRECTORY_SEPARATOR .$file);
        }, $this->_files);
    }
public function getFiles() : array
    {
        if(!$this->_isLoaded) {
            $this->load();
        }

        return array_map(function($file) {
            return new File($this->getPath(). DIRECTORY_SEPARATOR .$file);
        }, $this->_files);
    }
public function getFiles ( ) : array { if ( ! $ this -> _isLoaded ) { $ this -> load ( ) ; } return array_map ( function ( $ file ) { return new File ( $ this -> getPath ( ) . DIRECTORY_SEPARATOR . $ file ) ; } , $ this -> _files ) ; }
Returns an array with all files of the directory.

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