ftp_base::dirlist()publicWP 1.0

Method of the class: ftp_base{}

No Hooks.

Return

null. Nothing (null).

Usage

$ftp_base = new ftp_base();
$ftp_base->dirlist( $remote );
$remote (required)
-

ftp_base::dirlist() code WP 6.5.2

function dirlist($remote) {
	$list=$this->rawlist($remote, "-la");
	if($list===false) {
		$this->PushError("dirlist","cannot read remote folder list", "Cannot read remote folder \"".$remote."\" contents");
		return false;
	}

	$dirlist = array();
	foreach($list as $k=>$v) {
		$entry=$this->parselisting($v);
		if ( empty($entry) )
			continue;

		if($entry["name"]=="." or $entry["name"]=="..")
			continue;

		$dirlist[$entry['name']] = $entry;
	}

	return $dirlist;
}