public function scanDir()
    {
        // only possible in directories
        if (!$this->isDir() || !$this->exists()) {
            return null;
        }

        $fileList = [];
        $fileNameList = scandir($this->absoluteFileName);
        foreach ($fileNameList as $fileName) {
            // do not add . and ..
            if ($fileName === "." or $fileName === "..") {
                continue;
            }
            $absoluteFileName = $this->absoluteFileName . "/" . $fileName;
            $fileList [] = new File ($absoluteFileName);
        }

        return $fileList;
    }
public function scanDir()
    {
        // only possible in directories
        if (!$this->isDir() || !$this->exists()) {
            return null;
        }

        $fileList = [];
        $fileNameList = scandir($this->absoluteFileName);
        foreach ($fileNameList as $fileName) {
            // do not add . and ..
            if ($fileName === "." or $fileName === "..") {
                continue;
            }
            $absoluteFileName = $this->absoluteFileName . "/" . $fileName;
            $fileList [] = new File ($absoluteFileName);
        }

        return $fileList;
    }
public function scanDir ( ) { // only possible in directories if ( ! $ this -> isDir ( ) || ! $ this -> exists ( ) ) { return null ; } $ fileList = [ ] ; $ fileNameList = scandir ( $ this -> absoluteFileName ) ; foreach ( $ fileNameList as $ fileName ) { // do not add . and .. if ( $ fileName === "." or $ fileName === ".." ) { continue ; } $ absoluteFileName = $ this -> absoluteFileName . "/" . $ fileName ; $ fileList [ ] = new File ( $ absoluteFileName ) ; } return $ fileList ; }
scans a directory and returns a list of Files
@return File[]
scans a directory and returns a list of Files