@@ 214-223 (lines=10) @@ | ||
211 | * |
|
212 | * @return bool |
|
213 | */ |
|
214 | public function get($remote_file = null, $local_file = null, $mode = FTP_ASCII) |
|
215 | { |
|
216 | if (\ftp_get($this->_stream, $local_file, $remote_file, $mode)) { |
|
217 | return true; |
|
218 | } |
|
219 | ||
220 | $this->error = 'Failed to download file "'.$remote_file.'"'; |
|
221 | ||
222 | return false; |
|
223 | } |
|
224 | ||
225 | /** |
|
226 | * Get list of files/directories in directory |
|
@@ 270-279 (lines=10) @@ | ||
267 | * |
|
268 | * @return bool |
|
269 | */ |
|
270 | public function put($local_file = null, $remote_file = null, $mode = FTP_ASCII) |
|
271 | { |
|
272 | if (\ftp_put($this->_stream, $remote_file, $local_file, $mode)) { |
|
273 | return true; |
|
274 | } |
|
275 | ||
276 | $this->error = 'Failed to upload file "'.$local_file.'"'; |
|
277 | ||
278 | return false; |
|
279 | } |
|
280 | ||
281 | /** |
|
282 | * Get current directory |