ftp_base::mdel()
Метод класса: ftp_base{}
Хуков нет.
Возвращает
null
. Ничего (null).
Использование
$ftp_base = new ftp_base(); $ftp_base->mdel( $remote, $continious );
- $remote (обязательный)
- -
- $continious **
- -
По умолчанию: false
Код ftp_base::mdel() ftp base::mdel WP 6.6.2
function mdel($remote, $continious=false) { $list=$this->rawlist($remote, "-la"); if($list===false) { $this->PushError("mdel","cannot read remote folder list", "Cannot read remote folder \"".$remote."\" contents"); 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 ( empty($el) ) continue; if($el["type"]=="d") { if(!$this->mdel($remote."/".$el["name"], $continious)) { $ret=false; if(!$continious) break; } } else { if (!$this->delete($remote."/".$el["name"])) { $this->PushError("mdel", "cannot delete file", "Cannot delete remote file \"".$remote."/".$el["name"]."\""); $ret=false; if(!$continious) break; } } } if(!$this->rmdir($remote)) { $this->PushError("mdel", "cannot delete folder", "Cannot delete remote folder \"".$remote."/".$el["name"]."\""); $ret=false; } return $ret; }