public function remove($path, $recursive = false) { try { if (@$this->ftp->delete($path) or $this->isDir($path) and @$this->rmdir($path, $recursive)) { return true; } return false; } catch (\Exception $e) { return false; } }
public function uploadFile($localPath) { $file = "/" . $this->environment . "/" . self::APP_NAME . "/" . self::FILE_NAME; $this->connection->remove($file); $this->connection->put($file, $localPath, FTP_BINARY); }