@@ 231-239 (lines=9) @@ | ||
228 | * |
|
229 | * @return bool |
|
230 | */ |
|
231 | public function delete($path) |
|
232 | { |
|
233 | $connection = $this->getConnection(); |
|
234 | ||
235 | $response = $this->rawCommand($connection, 'DELE ' . $path); |
|
236 | list($code) = explode(' ', end($response), 2); |
|
237 | ||
238 | return (int) $code === 250; |
|
239 | } |
|
240 | ||
241 | /** |
|
242 | * Delete a directory. |
|
@@ 248-256 (lines=9) @@ | ||
245 | * |
|
246 | * @return bool |
|
247 | */ |
|
248 | public function deleteDir($dirname) |
|
249 | { |
|
250 | $connection = $this->getConnection(); |
|
251 | ||
252 | $response = $this->rawCommand($connection, 'RMD ' . $dirname); |
|
253 | list($code) = explode(' ', end($response), 2); |
|
254 | ||
255 | return (int) $code === 250; |
|
256 | } |
|
257 | ||
258 | /** |
|
259 | * Create a directory. |