class ftp extends transfer

FTP transfer class

Properties

$connection from  transfer
$host from  transfer
$port from  transfer
$username from  transfer
$password from  transfer
$timeout from  transfer
$root_path from  transfer
$tmp_path from  transfer
$file_perms from  transfer
$dir_perms from  transfer

Methods

__construct($host, $username, $password, $root_path, $port = 21, $timeout = 10)

Standard parameters for FTP session

write_file($destination_file = '', $contents = '')

Write file to location

from  transfer
overwrite_file($source_file, $destination_file)

Moving file into location. If the destination file already exists it gets overwritten

from  transfer
make_dir($dir)

Create directory structure

from  transfer
copy_file($from_loc, $to_loc)

Copy file from source location to destination location

from  transfer
delete_file($file)

Remove file

from  transfer
remove_dir($dir)

Remove directory

from  transfer
rename($old_handle, $new_handle)

Rename a file or folder

from  transfer
file_exists($directory, $filename)

Check if a specified file exist.

from  transfer
open_session()

Open session

from  transfer
close_session()

Close current session

from  transfer
static 
methods()

Determine methods able to be used

from  transfer
static 
data()

Requests data

Details

at line 267
__construct($host, $username, $password, $root_path, $port = 21, $timeout = 10)

Standard parameters for FTP session

Parameters

$host
$username
$password
$root_path
$port
$timeout

in transfer at line 55
write_file($destination_file = '', $contents = '')

Write file to location

Parameters

$destination_file
$contents

in transfer at line 91
overwrite_file($source_file, $destination_file)

Moving file into location. If the destination file already exists it gets overwritten

Parameters

$source_file
$destination_file

in transfer at line 107
make_dir($dir)

Create directory structure

Parameters

$dir

in transfer at line 147
copy_file($from_loc, $to_loc)

Copy file from source location to destination location

Parameters

$from_loc
$to_loc

in transfer at line 167
delete_file($file)

Remove file

Parameters

$file

in transfer at line 180
remove_dir($dir)

Remove directory

remove child directories?

Parameters

$dir

in transfer at line 192
rename($old_handle, $new_handle)

Rename a file or folder

Parameters

$old_handle
$new_handle

in transfer at line 204
file_exists($directory, $filename)

Check if a specified file exist.

..

Parameters

$directory
$filename

in transfer at line 224
open_session()

Open session

in transfer at line 232
close_session()

Close current session

in transfer at line 240
static methods()

Determine methods able to be used

at line 292
static data()

Requests data