class ftp extends transfer
FTP transfer class
Properties
| $connection | ||
| $host | ||
| $port | ||
| $username | ||
| $password | ||
| $timeout | ||
| $root_path | ||
| $tmp_path | ||
| $file_perms | ||
| $dir_perms |
Methods
|
transfer()
Constructor - init some basic values |
from transfer | |
|
write_file($destination_file = '', $contents = '')
Write file to location |
from transfer | |
|
overwrite_file($source_file, $destination_file)
Moving file into location. |
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 | |
|
methods()
Determine methods able to be used |
from transfer | |
|
ftp($host, $username, $password, $root_path, $port = 21, $timeout = 10)
Standard parameters for FTP session |
||
|
data()
Requests data |
||
|
_init()
Init FTP Session |
||
|
_mkdir($dir)
Create Directory (MKDIR) |
||
|
_rmdir($dir)
Remove directory (RMDIR) |
||
|
_rename($old_handle, $new_handle)
Rename file |
||
|
_chdir($dir = '')
Change current working directory (CHDIR) |
||
|
_chmod($file, $perms)
change file permissions (CHMOD) |
||
|
_put($from_file, $to_file)
Upload file to location (PUT) |
||
|
_delete($file)
Delete file (DELETE) |
||
|
_close()
Close ftp session (CLOSE) |
||
|
_cwd()
Return current working directory (CWD) At the moment not used by parent class |
||
|
_ls($dir = './')
Return list of files in a given directory (LS) |
||
|
_site($command)
FTP SITE command (ftp-only function) |
Details
in transfer at line 39
public
transfer()
Constructor - init some basic values
in transfer at line 53
public
write_file($destination_file = '', $contents = '')
Write file to location
in transfer at line 89
public
overwrite_file($source_file, $destination_file)
Moving file into location.
If the destination file already exists it gets overwritten
in transfer at line 105
public
make_dir($dir)
Create directory structure
in transfer at line 145
public
copy_file($from_loc, $to_loc)
Copy file from source location to destination location
in transfer at line 165
public
delete_file($file)
Remove file
in transfer at line 178
public
remove_dir($dir)
Remove directory
in transfer at line 190
public
rename($old_handle, $new_handle)
Rename a file or folder
in transfer at line 202
public
file_exists($directory, $filename)
Check if a specified file exist...
in transfer at line 222
public
open_session()
Open session
in transfer at line 230
public
close_session()
Close current session
in transfer at line 238
public
methods()
Determine methods able to be used
at line 266
public
ftp($host, $username, $password, $root_path, $port = 21, $timeout = 10)
Standard parameters for FTP session
at line 291
public
data()
Requests data
at line 309
public
_init()
Init FTP Session
at line 341
public
_mkdir($dir)
Create Directory (MKDIR)
at line 350
public
_rmdir($dir)
Remove directory (RMDIR)
at line 359
public
_rename($old_handle, $new_handle)
Rename file
at line 368
public
_chdir($dir = '')
Change current working directory (CHDIR)
at line 385
public
_chmod($file, $perms)
change file permissions (CHMOD)
at line 406
public
_put($from_file, $to_file)
Upload file to location (PUT)
at line 428
public
_delete($file)
Delete file (DELETE)
at line 437
public
_close()
Close ftp session (CLOSE)
at line 452
public
_cwd()
Return current working directory (CWD) At the moment not used by parent class
at line 461
public
_ls($dir = './')
Return list of files in a given directory (LS)
at line 501
public
_site($command)
FTP SITE command (ftp-only function)