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