| @@ 217-225 (lines=9) @@ | ||
| 214 | * | |
| 215 | * @return bool | |
| 216 | */ | |
| 217 | public function delete($path) | |
| 218 |     { | |
| 219 | $connection = $this->getConnection(); | |
| 220 | ||
| 221 | $response = $this->rawCommand($connection, 'DELE ' . $path); | |
| 222 |         list($code) = explode(' ', end($response), 2); | |
| 223 | ||
| 224 | return (int) $code === 250; | |
| 225 | } | |
| 226 | ||
| 227 | /** | |
| 228 | * Delete a directory. | |
| @@ 234-242 (lines=9) @@ | ||
| 231 | * | |
| 232 | * @return bool | |
| 233 | */ | |
| 234 | public function deleteDir($dirname) | |
| 235 |     { | |
| 236 | $connection = $this->getConnection(); | |
| 237 | ||
| 238 | $response = $this->rawCommand($connection, 'RMD ' . $dirname); | |
| 239 |         list($code) = explode(' ', end($response), 2); | |
| 240 | ||
| 241 | return (int) $code === 250; | |
| 242 | } | |
| 243 | ||
| 244 | /** | |
| 245 | * Create a directory. | |