summaryrefslogtreecommitdiffstats
path: root/system/libraries/Ftp.php
diff options
context:
space:
mode:
authorAndrey Andreev <narf@bofh.bg>2012-11-01 21:56:26 +0100
committerAndrey Andreev <narf@bofh.bg>2012-11-01 21:56:26 +0100
commit597ea27a0660bdf72f84d74566cc842e4da37efd (patch)
tree11c00369a16d21971c23a6af9ce11110e059c3d6 /system/libraries/Ftp.php
parent254735ee011d99f5c7fe3825849d7ec0b54bd4e1 (diff)
[ci skip] DocBlocks for Email, Ftp, Unit_test and Javascript libraries
Partially fixes issue #1295
Diffstat (limited to 'system/libraries/Ftp.php')
-rw-r--r--system/libraries/Ftp.php103
1 files changed, 74 insertions, 29 deletions
diff --git a/system/libraries/Ftp.php b/system/libraries/Ftp.php
index b9954c7f2..60c03b5ad 100644
--- a/system/libraries/Ftp.php
+++ b/system/libraries/Ftp.php
@@ -37,18 +37,63 @@ defined('BASEPATH') OR exit('No direct script access allowed');
*/
class CI_FTP {
+ /**
+ * FTP Server hostname
+ *
+ * @var string
+ */
public $hostname = '';
+
+ /**
+ * FTP Username
+ *
+ * @var string
+ */
public $username = '';
+
+ /**
+ * FTP Password
+ *
+ * @var string
+ */
public $password = '';
+
+ /**
+ * FTP Server port
+ *
+ * @var int
+ */
public $port = 21;
+
+ /**
+ * Passive mode flag
+ *
+ * @var bool
+ */
public $passive = TRUE;
+
+ /**
+ * Debug flag
+ *
+ * Specifies whether to display error messages.
+ *
+ * @var bool
+ */
public $debug = FALSE;
+
+ /**
+ * Connection
+ *
+ * @var resource
+ */
public $conn_id = FALSE;
+ // --------------------------------------------------------------------
+
/**
* Constructor
*
- * @param array $config = array()
+ * @param array $config
* @return void
*/
public function __construct($config = array())
@@ -66,7 +111,7 @@ class CI_FTP {
/**
* Initialize preferences
*
- * @param array
+ * @param array $config
* @return void
*/
public function initialize($config = array())
@@ -88,7 +133,7 @@ class CI_FTP {
/**
* FTP Connect
*
- * @param array the connection values
+ * @param array $config Connection values
* @return bool
*/
public function connect($config = array())
@@ -168,8 +213,8 @@ class CI_FTP {
* so we do it by trying to change to a particular directory.
* Internally, this parameter is only used by the "mirror" function below.
*
- * @param string
- * @param bool
+ * @param string $path
+ * @param bool $supress_debug
* @return bool
*/
public function changedir($path = '', $supress_debug = FALSE)
@@ -198,8 +243,8 @@ class CI_FTP {
/**
* Create a directory
*
- * @param string
- * @param int
+ * @param string $path
+ * @param int $permissions
* @return bool
*/
public function mkdir($path = '', $permissions = NULL)
@@ -234,10 +279,10 @@ class CI_FTP {
/**
* Upload a file to the server
*
- * @param string
- * @param string
- * @param string
- * @param int
+ * @param string $locpath
+ * @param string $rempath
+ * @param string $mode
+ * @param int $permissions
* @return bool
*/
public function upload($locpath, $rempath, $mode = 'auto', $permissions = NULL)
@@ -288,9 +333,9 @@ class CI_FTP {
/**
* Download a file from a remote server to the local server
*
- * @param string
- * @param string
- * @param string
+ * @param string $rempath
+ * @param string $locpath
+ * @param string $mode
* @return bool
*/
public function download($rempath, $locpath, $mode = 'auto')
@@ -329,9 +374,9 @@ class CI_FTP {
/**
* Rename (or move) a file
*
- * @param string
- * @param string
- * @param bool
+ * @param string $old_file
+ * @param string $new_file
+ * @param bool $move
* @return bool
*/
public function rename($old_file, $new_file, $move = FALSE)
@@ -360,8 +405,8 @@ class CI_FTP {
/**
* Move a file
*
- * @param string
- * @param string
+ * @param string $old_file
+ * @param string $new_file
* @return bool
*/
public function move($old_file, $new_file)
@@ -374,7 +419,7 @@ class CI_FTP {
/**
* Rename (or move) a file
*
- * @param string
+ * @param string $filepath
* @return bool
*/
public function delete_file($filepath)
@@ -404,7 +449,7 @@ class CI_FTP {
* Delete a folder and recursively delete everything (including sub-folders)
* containted within it.
*
- * @param string
+ * @param string $filepath
* @return bool
*/
public function delete_dir($filepath)
@@ -451,8 +496,8 @@ class CI_FTP {
/**
* Set file permissions
*
- * @param string the file path
- * @param int the permissions
+ * @param string $path File path
+ * @param int $perm Permissions
* @return bool
*/
public function chmod($path, $perm)
@@ -481,7 +526,7 @@ class CI_FTP {
/**
* FTP List files in the specified directory
*
- * @param string $path = '.'
+ * @param string $path
* @return array
*/
public function list_files($path = '.')
@@ -504,8 +549,8 @@ class CI_FTP {
* Whatever the directory structure of the original file path will be
* recreated on the server.
*
- * @param string path to source with trailing slash
- * @param string path to destination - include the base folder with trailing slash
+ * @param string $locpath Path to source with trailing slash
+ * @param string $rempath Path to destination - include the base folder with trailing slash
* @return bool
*/
public function mirror($locpath, $rempath)
@@ -551,7 +596,7 @@ class CI_FTP {
/**
* Extract the file extension
*
- * @param string
+ * @param string $filename
* @return string
*/
protected function _getext($filename)
@@ -570,7 +615,7 @@ class CI_FTP {
/**
* Set the upload type
*
- * @param string
+ * @param string $ext Filename extension
* @return string
*/
protected function _settype($ext)
@@ -617,7 +662,7 @@ class CI_FTP {
/**
* Display error message
*
- * @param string
+ * @param string $line
* @return void
*/
protected function _error($line)