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

methods()

Determine methods able to be used

Details

at line 39
public transfer()

Constructor - init some basic values

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

Write file to location

Parameters

$destination_file
$contents

at line 89
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 105
public make_dir($dir)

Create directory structure

Parameters

$dir

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

Copy file from source location to destination location

Parameters

$from_loc
$to_loc

at line 165
public delete_file($file)

Remove file

Parameters

$file

at line 178
public remove_dir($dir)

Remove directory

Parameters

$dir

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

Rename a file or folder

Parameters

$old_handle
$new_handle

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

Check if a specified file exist...

Parameters

$directory
$filename

at line 222
public open_session()

Open session

at line 230
public close_session()

Close current session

at line 238
public methods()

Determine methods able to be used