summaryrefslogtreecommitdiffstats
path: root/user_guide/libraries/ftp.html
diff options
context:
space:
mode:
authorDerek Jones <derek.jones@ellislab.com>2010-03-22 17:11:30 +0100
committerDerek Jones <derek.jones@ellislab.com>2010-03-22 17:11:30 +0100
commit7ec3650749b2c4baf1600bf09fdf3e41f06d87d1 (patch)
tree72ca75a1607e922e281566a619cdf550c9c5f960 /user_guide/libraries/ftp.html
parent28b293729d2c2917c434c6296eafecd19f397303 (diff)
added documentation for philsturgeon's submission of download() for the FTP library
Diffstat (limited to 'user_guide/libraries/ftp.html')
-rw-r--r--user_guide/libraries/ftp.html13
1 files changed, 13 insertions, 0 deletions
diff --git a/user_guide/libraries/ftp.html b/user_guide/libraries/ftp.html
index 10acdcdab..b5194e8ad 100644
--- a/user_guide/libraries/ftp.html
+++ b/user_guide/libraries/ftp.html
@@ -188,6 +188,19 @@ Example:</p>
<p>Permissions are available if you are running PHP 5 and can be passed as an <kbd>octal</kbd> value in the fourth parameter.</p>
+<h2>$this->ftp->download()</h2>
+
+<p>Downloads a file from your server. You must supply the remote path and the local path, and you can optionally set the mode.
+Example:</p>
+
+<code>$this->ftp->download('/public_html/myfile.html', '/local/path/to/myfile.html', 'ascii');</code>
+
+<p><strong>Mode options are:</strong>&nbsp; <kbd>ascii</kbd>, <kbd>binary</kbd>, and <kbd>auto</kbd> (the default). If
+<kbd>auto</kbd> is used it will base the mode on the file extension of the source file.</p>
+
+<p>Returns FALSE if the download does not execute successfully (including if PHP does not have permission to write the local file)</p>
+
+
<h2>$this->ftp->rename()</h2>
<p>Permits you to rename a file. Supply the source file name/path and the new file name/path.</p>