PHP Class Pop\Ftp\Ftp

Author: Nick Sagona, III ([email protected])
Show file Open project: nicksagona/PopPHP Class Usage Examples

Protected Properties

Property Type Description
$conn FTP resource

Public Methods

Method Description
__construct ( string $ftp, string $user, string $pass, boolean $ssl = false ) : Ftp Constructor
__destruct ( ) : void Close the FTP connection.
chdir ( string $dir ) : Ftp Change directories.
chmod ( string $file, string $mode ) : Ftp Change permissions.
delete ( string $file ) : Ftp Delete file.
get ( string $local, string $remote, integer | string $mode = FTP_BINARY ) : Ftp Get file.
mkdir ( string $dir ) : Ftp Make directory.
pasv ( boolean $flag = true ) : Ftp Switch the passive mode.
put ( string $remote, string $local, integer | string $mode = FTP_BINARY ) : Ftp Put file.
pwd ( ) : string Return current working directory.
rename ( string $old, string $new ) : Ftp Rename file.
rmdir ( string $dir ) : Ftp Remove directory.

Method Details

__construct() public method

Instantiate the FTP object.
public __construct ( string $ftp, string $user, string $pass, boolean $ssl = false ) : Ftp
$ftp string
$user string
$pass string
$ssl boolean
return Ftp

__destruct() public method

Close the FTP connection.
public __destruct ( ) : void
return void

chdir() public method

Change directories.
public chdir ( string $dir ) : Ftp
$dir string
return Ftp

chmod() public method

Change permissions.
public chmod ( string $file, string $mode ) : Ftp
$file string
$mode string
return Ftp

delete() public method

Delete file.
public delete ( string $file ) : Ftp
$file string
return Ftp

get() public method

Get file.
public get ( string $local, string $remote, integer | string $mode = FTP_BINARY ) : Ftp
$local string
$remote string
$mode integer | string
return Ftp

mkdir() public method

Make directory.
public mkdir ( string $dir ) : Ftp
$dir string
return Ftp

pasv() public method

Switch the passive mode.
public pasv ( boolean $flag = true ) : Ftp
$flag boolean
return Ftp

put() public method

Put file.
public put ( string $remote, string $local, integer | string $mode = FTP_BINARY ) : Ftp
$remote string
$local string
$mode integer | string
return Ftp

pwd() public method

Return current working directory.
public pwd ( ) : string
return string

rename() public method

Rename file.
public rename ( string $old, string $new ) : Ftp
$old string
$new string
return Ftp

rmdir() public method

Remove directory.
public rmdir ( string $dir ) : Ftp
$dir string
return Ftp

Property Details

$conn protected property

FTP resource
protected $conn