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
__construct()
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
__construct()
Constructor - init some basic values
at line 55
public
write_file($destination_file = '', $contents = '')
Write file to location
at line 91
public
overwrite_file($source_file, $destination_file)
Moving file into location.
If the destination file already exists it gets overwritten
at line 107
public
make_dir($dir)
Create directory structure
at line 147
public
copy_file($from_loc, $to_loc)
Copy file from source location to destination location
at line 167
public
delete_file($file)
Remove file
at line 180
public
remove_dir($dir)
Remove directory
at line 192
public
rename($old_handle, $new_handle)
Rename a file or folder
at line 204
public
file_exists($directory, $filename)
Check if a specified file exist...
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