src/filesystem/Directory.php
public function getFiles() : array
    {
        Filesystem::checkExists($this->path);
        Filesystem::checkReadable($this->path);
        $contents = [];

        $files = scandir($this->path);
        foreach ($files as $file) {
            if($file != '.' && $file != '..') {
                $contents[] = Filesystem::get("$this->path/$file");
            }
        }
        return $contents;
    }
public function getFiles() : array
    {
        Filesystem::checkExists($this->path);
        Filesystem::checkReadable($this->path);
        $contents = [];

        $files = scandir($this->path);
        foreach ($files as $file) {
            if($file != '.' && $file != '..') {
                $contents[] = Filesystem::get("$this->path/$file");
            }
        }
        return $contents;
    }
public function getFiles ( ) : array { Filesystem :: checkExists ( $ this -> path ) ; Filesystem :: checkReadable ( $ this -> path ) ; $ contents = [ ] ; $ files = scandir ( $ this -> path ) ; foreach ( $ files as $ file ) { if ( $ file != '.' && $ file != '..' ) { $ contents [ ] = Filesystem :: get ( "$this->path/$file" ) ; } } return $ contents ; }
Get the files in the directory.

@throws FilesystemException
@throws \ntentan\utils\exceptions\FileNotFoundException
@throws \ntentan\utils\exceptions\FileNotReadableException
@return array<FileInterface>
Get the files in the directory .