@@ 249-258 (lines=10) @@ | ||
246 | * |
|
247 | * @return bool |
|
248 | */ |
|
249 | public function mkdir($directory = null) |
|
250 | { |
|
251 | if (ftp_mkdir($this->_stream, $directory)) { |
|
252 | return true; |
|
253 | } |
|
254 | ||
255 | $this->error = 'Failed to create directory "' . $directory . '"'; |
|
256 | ||
257 | return false; |
|
258 | } |
|
259 | ||
260 | /** |
|
261 | * Upload file to server |
|
@@ 316-325 (lines=10) @@ | ||
313 | * |
|
314 | * @return bool |
|
315 | */ |
|
316 | public function rmdir($directory = null) |
|
317 | { |
|
318 | if (ftp_rmdir($this->_stream, $directory)) { |
|
319 | return true; |
|
320 | } |
|
321 | ||
322 | $this->error = 'Failed to remove directory "' . $directory . '"'; |
|
323 | ||
324 | return false; |
|
325 | } |
|
326 | } |
|
327 |