private function lsLegacy(string $path) : array
    {
        $list = [];
        foreach ($this->nlist($path) as $name) {
            $type   = $this->isDir($name) ? 'dir' : 'file';
            $size   = $this->size($name);
            $mtime  = $this->mdtm($name);

            if ($mtime == -1) {
                throw new RuntimeException('FTP server doesnt support \'ftp_mdtm\'');
            }

            $list[] = new File(['name' => $name, 'modify' => $mtime, 'type' => $type, 'size' => $size]);
        }
        return $list;
    }
private function lsLegacy(string $path) : array
    {
        $list = [];
        foreach ($this->nlist($path) as $name) {
            $type   = $this->isDir($name) ? 'dir' : 'file';
            $size   = $this->size($name);
            $mtime  = $this->mdtm($name);

            if ($mtime == -1) {
                throw new RuntimeException('FTP server doesnt support \'ftp_mdtm\'');
            }

            $list[] = new File(['name' => $name, 'modify' => $mtime, 'type' => $type, 'size' => $size]);
        }
        return $list;
    }
private function lsLegacy ( string $ path ) : array { $ list = [ ] ; foreach ( $ this -> nlist ( $ path ) as $ name ) { $ type = $ this -> isDir ( $ name ) ? 'dir' : 'file' ; $ size = $ this -> size ( $ name ) ; $ mtime = $ this -> mdtm ( $ name ) ; if ( $ mtime == - 1 ) { throw new RuntimeException ( 'FTP server doesnt support \'ftp_mdtm\'' ) ; } $ list [ ] = new File ( [ 'name' => $ name , 'modify' => $ mtime , 'type' => $ type , 'size' => $ size ] ) ; } return $ list ; }
Return list of all files in directory for php version below 7.2.0.

@param  string $path
@return \SebastianFeldmann\Ftp\File[]
@throws \Exception
Return list of all files in directory for php version below 7 . 2 . 0 .