public function rename($old, $new) { if (!ftp_rename($this->conn, $old, $new)) { throw new Exception('Error: There was an error renaming the file ' . $old); } return $this; }