| @@ 178-187 (lines=10) @@ | ||
| 175 | * | |
| 176 | * @return bool | |
| 177 | */ | |
| 178 | public function rename($path, $newpath) | |
| 179 |     { | |
| 180 | $connection = $this->getConnection(); | |
| 181 | ||
| 182 | $result = $connection->exec([ | |
| 183 | CURLOPT_POSTQUOTE => ['RNFR ' . $path, 'RNTO ' . $newpath], | |
| 184 | ]); | |
| 185 | ||
| 186 | return $result !== false; | |
| 187 | } | |
| 188 | ||
| 189 | /** | |
| 190 | * Copy a file. | |
| @@ 215-224 (lines=10) @@ | ||
| 212 | * | |
| 213 | * @return bool | |
| 214 | */ | |
| 215 | public function delete($path) | |
| 216 |     { | |
| 217 | $connection = $this->getConnection(); | |
| 218 | ||
| 219 | $result = $connection->exec([ | |
| 220 | CURLOPT_POSTQUOTE => ['DELE ' . $path], | |
| 221 | ]); | |
| 222 | ||
| 223 | return $result !== false; | |
| 224 | } | |
| 225 | ||
| 226 | /** | |
| 227 | * Delete a directory. | |
| @@ 233-242 (lines=10) @@ | ||
| 230 | * | |
| 231 | * @return bool | |
| 232 | */ | |
| 233 | public function deleteDir($dirname) | |
| 234 |     { | |
| 235 | $connection = $this->getConnection(); | |
| 236 | ||
| 237 | $result = $connection->exec([ | |
| 238 | CURLOPT_POSTQUOTE => ['RMD ' . $dirname], | |
| 239 | ]); | |
| 240 | ||
| 241 | return $result !== false; | |
| 242 | } | |
| 243 | ||
| 244 | /** | |
| 245 | * Create a directory. | |