| @@ 208-216 (lines=9) @@ | ||
| 205 | * |
|
| 206 | * @return bool |
|
| 207 | */ |
|
| 208 | public function delete($path) |
|
| 209 | { |
|
| 210 | $connection = $this->getConnection(); |
|
| 211 | ||
| 212 | $response = $this->rawCommand($connection, 'DELE ' . $path); |
|
| 213 | list($code) = explode(' ', end($response), 2); |
|
| 214 | ||
| 215 | return (int) $code === 250; |
|
| 216 | } |
|
| 217 | ||
| 218 | /** |
|
| 219 | * Delete a directory. |
|
| @@ 225-233 (lines=9) @@ | ||
| 222 | * |
|
| 223 | * @return bool |
|
| 224 | */ |
|
| 225 | public function deleteDir($dirname) |
|
| 226 | { |
|
| 227 | $connection = $this->getConnection(); |
|
| 228 | ||
| 229 | $response = $this->rawCommand($connection, 'RMD ' . $dirname); |
|
| 230 | list($code) = explode(' ', end($response), 2); |
|
| 231 | ||
| 232 | return (int) $code === 250; |
|
| 233 | } |
|
| 234 | ||
| 235 | /** |
|
| 236 | * Create a directory. |
|