40 public function connect($ssl =
false, $timeout = 90){
41 $this->connection = $ssl ? ftp_ssl_connect($this->server, $this->port, $timeout) : ftp_connect($this->server, $this->port, $timeout);
42 if (!ftp_login($this->connection, $this->uname, $this->pass)){
53 public function pasv($bool =
true){
54 ftp_pasv($this->connection, $bool);
61 public function pwd(){
62 return ftp_pwd($this->connection);
71 return ftp_chdir($this->connection,
$dir);
79 public function delete($ruta){
80 return ftp_delete($this->connection, $ruta);
89 public function chmod($mode, $ruta){
90 return ftp_chmod($this->connection, intval($mode), $ruta);
101 public function get($local, $remote, $mode = FTP_ASCII, $pos = 0){
102 return ftp_get($this->connection, $local, $remote, $mode, $pos);
111 return ftp_mdtm($this->connection, $ruta);
120 return ftp_mkdir($this->connection,
$dir);
129 return ftp_nlist($this->connection,
$dir);
140 public function put($remote, $local, $mode = FTP_ASCII, $pos = 0){
141 return ftp_put($this->connection, $remote, $local, $mode, $pos);
151 return ftp_rawlist($this->connection,
$dir, $mode);
161 return ftp_rename($this->connection, $old, $new);
170 return ftp_rmdir($this->connection,
$dir);
179 return ftp_size($this->connection,
$file);
183 return ftp_systype($this->connection);
192 $current = $this->
pwd();
194 $this->
chdir($current);
205 ftp_close($this->connection);