Documentation

Ftp
in package

FTP class

Tags
category

Pop

author

Nick Sagona, III dev@nolainteractive.com

copyright

Copyright (c) 2009-2024 NOLA Interactive, LLC. (http://www.nolainteractive.com)

license

http://www.popphp.org/license New BSD License

version
4.0.0

Table of Contents

Properties

$address  : string|null
FTP address
$connection  : mixed
FTP resource
$connectionString  : string|null
FTP connection string
$password  : string|null
FTP password
$username  : string|null
FTP username

Methods

__construct()  : mixed
Constructor
chdir()  : Ftp
Change directories
chmod()  : Ftp
Change permissions
delete()  : Ftp
Delete file
dirExists()  : bool
Check if directory exists
disconnect()  : void
Close the FTP connection.
fileExists()  : bool
Check if file exists
get()  : Ftp
Get file
getConnection()  : mixed
Get the connection resource
getConnectionString()  : string
Get the connection string
isConnected()  : bool
Determine whether or not connected
mkdir()  : Ftp
Make directory
mkdirs()  : Ftp
Make nested sub-directories
pasv()  : Ftp
Switch the passive mode
put()  : Ftp
Put file
pwd()  : string
Return current working directory
rename()  : Ftp
Rename file
rmdir()  : Ftp
Remove directory

Properties

$address

FTP address

protected string|null $address = null

$connection

FTP resource

protected mixed $connection = null

$connectionString

FTP connection string

protected string|null $connectionString = null

$password

FTP password

protected string|null $password = null

$username

FTP username

protected string|null $username = null

Methods

__construct()

Constructor

public __construct(string $address, string $user, string $pass[, bool $ssl = false ]) : mixed

Instantiate the FTP object

Parameters
$address : string
$user : string
$pass : string
$ssl : bool = false
Tags
throws
Exception

chdir()

Change directories

public chdir(string $dir) : Ftp
Parameters
$dir : string
Tags
throws
Exception
Return values
Ftp

chmod()

Change permissions

public chmod(string $file, string $mode) : Ftp
Parameters
$file : string
$mode : string
Tags
throws
Exception
Return values
Ftp

delete()

Delete file

public delete(string $file) : Ftp
Parameters
$file : string
Tags
throws
Exception
Return values
Ftp

dirExists()

Check if directory exists

public dirExists(string $dir) : bool
Parameters
$dir : string
Return values
bool

disconnect()

Close the FTP connection.

public disconnect() : void

fileExists()

Check if file exists

public fileExists(string $file) : bool
Parameters
$file : string
Return values
bool

get()

Get file

public get(string $local, string $remote[, int $mode = FTP_BINARY ]) : Ftp
Parameters
$local : string
$remote : string
$mode : int = FTP_BINARY
Tags
throws
Exception
Return values
Ftp

getConnection()

Get the connection resource

public getConnection() : mixed

getConnectionString()

Get the connection string

public getConnectionString() : string
Return values
string

isConnected()

Determine whether or not connected

public isConnected() : bool
Return values
bool

mkdir()

Make directory

public mkdir(string $dir) : Ftp
Parameters
$dir : string
Tags
throws
Exception
Return values
Ftp

mkdirs()

Make nested sub-directories

public mkdirs(string $dirs) : Ftp
Parameters
$dirs : string
Tags
throws
Exception
Return values
Ftp

pasv()

Switch the passive mode

public pasv([bool $flag = true ]) : Ftp
Parameters
$flag : bool = true
Return values
Ftp

put()

Put file

public put(string $remote, string $local[, int $mode = FTP_BINARY ]) : Ftp
Parameters
$remote : string
$local : string
$mode : int = FTP_BINARY
Tags
throws
Exception
Return values
Ftp

pwd()

Return current working directory

public pwd() : string
Return values
string

rename()

Rename file

public rename(string $old, string $new) : Ftp
Parameters
$old : string
$new : string
Tags
throws
Exception
Return values
Ftp

rmdir()

Remove directory

public rmdir(string $dir) : Ftp
Parameters
$dir : string
Tags
throws
Exception
Return values
Ftp

        
On this page

Search results