@@ 443-463 (lines=21) @@ | ||
440 | * @param string $filepath |
|
441 | * @return bool |
|
442 | */ |
|
443 | public function delete_file($filepath) |
|
444 | { |
|
445 | if ( ! $this->_is_conn()) |
|
446 | { |
|
447 | return FALSE; |
|
448 | } |
|
449 | ||
450 | $result = @ftp_delete($this->conn_id, $filepath); |
|
451 | ||
452 | if ($result === FALSE) |
|
453 | { |
|
454 | if ($this->debug === TRUE) |
|
455 | { |
|
456 | $this->_error('ftp_unable_to_delete'); |
|
457 | } |
|
458 | ||
459 | return FALSE; |
|
460 | } |
|
461 | ||
462 | return TRUE; |
|
463 | } |
|
464 | ||
465 | // -------------------------------------------------------------------- |
|
466 | ||
@@ 520-538 (lines=19) @@ | ||
517 | * @param int $perm Permissions |
|
518 | * @return bool |
|
519 | */ |
|
520 | public function chmod($path, $perm) |
|
521 | { |
|
522 | if ( ! $this->_is_conn()) |
|
523 | { |
|
524 | return FALSE; |
|
525 | } |
|
526 | ||
527 | if (@ftp_chmod($this->conn_id, $perm, $path) === FALSE) |
|
528 | { |
|
529 | if ($this->debug === TRUE) |
|
530 | { |
|
531 | $this->_error('ftp_unable_to_chmod'); |
|
532 | } |
|
533 | ||
534 | return FALSE; |
|
535 | } |
|
536 | ||
537 | return TRUE; |
|
538 | } |
|
539 | ||
540 | // -------------------------------------------------------------------- |
|
541 |