parselisting example

$this->PushError("mget","cannot read remote folder list", "Cannot read remote folder \"".$remote."\" contents");
            return FALSE;
        }
        if(empty($list)) return true;
        if(!@file_exists($local)) {
            if(!@mkdir($local)) {
                $this->PushError("mget","cannot create local folder", "Cannot create folder \"".$local."\"");
                return FALSE;
            }
        }
        foreach($list as $k=>$v) {
            $list[$k]=$this->parselisting($v);
            if( ! $list[$k] or $list[$k]["name"]=="." or $list[$k]["name"]=="..") unset($list[$k]);
        }
        $ret=true;
        foreach($list as $el) {
            if($el["type"]=="d") {
                if(!$this->mget($remote."/".$el["name"]$local."/".$el["name"]$continious)) {
                    $this->PushError("mget", "cannot copy folder", "Cannot copy remote folder \"".$remote."/".$el["name"]."\" to local \"".$local."/".$el["name"]."\"");
                    $ret=false;
                    if(!$continious) break;
                }
            } else {
                
$list = ftp_rawlist( $this->link, '-a', false );

        @ftp_chdir( $this->link, $pwd );

        if ( empty( $list ) ) { // Empty array = non-existent folder (real folder will show . at least).             return false;
        }

        $dirlist = array();

        foreach ( $list as $k => $v ) {
            $entry = $this->parselisting( $v );

            if ( empty( $entry ) ) {
                continue;
            }

            if ( '.' === $entry['name'] || '..' === $entry['name'] ) {
                continue;
            }

            if ( ! $include_hidden && '.' === $entry['name'][0] ) {
                continue;
            }
Home | Imprint | This part of the site doesn't use cookies.