phpBB API Documentation
Class

transfer

class transfer

Transfer class, wrapper for ftp/sftp/ssh

Properties

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

Methods

transfer()

Constructor - init some basic values

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

Write file to location

overwrite_file($source_file, $destination_file)

Moving file into location.

make_dir($dir)

Create directory structure

copy_file($from_loc, $to_loc)

Copy file from source location to destination location

delete_file($file)

Remove file

remove_dir($dir)

Remove directory

rename($old_handle, $new_handle)

Rename a file or folder

file_exists($directory, $filename)

Check if a specified file exist...

open_session()

Open session

close_session()

Close current session

static  methods()

Determine methods able to be used

Details

at line 41
public transfer()

Constructor - init some basic values

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

Write file to location

Parameters

$destination_file
$contents

at line 91
public overwrite_file($source_file, $destination_file)

Moving file into location.

If the destination file already exists it gets overwritten

Parameters

$source_file
$destination_file

at line 107
public make_dir($dir)

Create directory structure

Parameters

$dir

at line 147
public copy_file($from_loc, $to_loc)

Copy file from source location to destination location

Parameters

$from_loc
$to_loc

at line 167
public delete_file($file)

Remove file

Parameters

$file

at line 180
public remove_dir($dir)

Remove directory

Parameters

$dir

at line 192
public rename($old_handle, $new_handle)

Rename a file or folder

Parameters

$old_handle
$new_handle

at line 204
public file_exists($directory, $filename)

Check if a specified file exist...

Parameters

$directory
$filename

at line 224
public open_session()

Open session

at line 232
public close_session()

Close current session

at line 240
static public methods()

Determine methods able to be used