Method |
Description |
|
__construct ( string $host, integer $port = 22, integer $timeout = 10 ) : SFTP |
Default Constructor. |
|
_close_handle ( string $handle ) : boolean |
Close handle |
|
_comparator ( array $a, array $b ) : integer |
Compares two rawlist entries using parameters set by setListOrder() |
|
_delete_recursive ( string $path, integer &$i ) : boolean |
Recursively deletes directories on the SFTP server |
|
_disconnect ( integer $reason ) : boolean |
Disconnect |
|
_get_lstat_cache_prop ( string $path, string $prop ) : mixed |
Return an lstat properity |
|
_get_sftp_packet ( ) : string |
Receives SFTP Packets |
|
_get_stat_cache_prop ( string $path, string $prop ) : mixed |
Return a stat properity |
|
_get_xstat_cache_prop ( string $path, string $prop, $type ) : mixed |
Return a stat or lstat properity |
|
_list ( string $dir, boolean $raw = true ) : mixed |
Reads a list, be it detailed or not, of files in the given directory |
|
_logError ( string $response, integer $status ) |
Logs errors |
|
_mkdir_helper ( string $dir, $attr ) : boolean |
Helper function for directory creation |
|
_nlist_helper ( string $dir, boolean $recursive, string $relativeDir ) : mixed |
Helper method for nlist |
|
_parseAttributes ( string &$response ) : array |
Parse Attributes |
|
_parseLongname ( string $longname ) : mixed |
Parse Longname |
|
_parseMode ( integer $mode ) : integer |
Attempt to identify the file type |
|
_query_stat_cache ( $path ) : mixed |
Checks cache for path |
|
_read_put_responses ( integer $i ) : boolean |
Reads multiple successive SSH_FXP_WRITE responses |
|
_realpath ( string $path ) : mixed |
Canonicalize the Server-Side Path Name |
|
_remove_from_stat_cache ( string $path ) : boolean |
Remove files / directories from cache |
|
_send_sftp_packet ( integer $type, string $data ) : boolean |
Sends SFTP Packets |
|
_setstat ( string $filename, string $attr, boolean $recursive ) : boolean |
Sets information about a file |
|
_setstat_recursive ( string $path, string $attr, integer &$i ) : boolean |
Recursively sets information on directories on the SFTP server |
|
_stat ( string $filename, integer $type ) : mixed |
Returns general information about a file or symbolic link |
|
_update_stat_cache ( string $path, mixed $value ) |
Save files / directories to cache |
|
chdir ( string $dir ) : boolean |
Changes the current directory |
|
chgrp ( string $filename, integer $gid, boolean $recursive = false ) : boolean |
Changes file or directory group |
|
chmod ( integer $mode, string $filename, boolean $recursive = false ) : mixed |
Set permissions on a file. |
|
chown ( string $filename, integer $uid, boolean $recursive = false ) : boolean |
Changes file or directory owner |
|
clearStatCache ( ) |
Clear the stat cache |
|
delete ( string $path, boolean $recursive = true ) : boolean |
Deletes a file on the SFTP server. |
|
disableStatCache ( ) |
Disable the stat cache |
|
enableStatCache ( ) |
Enable the stat cache |
|
file_exists ( string $path ) : boolean |
Checks whether a file or directory exists |
|
fileatime ( string $path ) : mixed |
Gets last access time of file |
|
filegroup ( string $path ) : mixed |
Gets file group |
|
filemtime ( string $path ) : mixed |
Gets file modification time |
|
fileowner ( string $path ) : mixed |
Gets file owner |
|
fileperms ( string $path ) : mixed |
Gets file permissions |
|
filesize ( string $path ) : mixed |
Gets file size |
|
filetype ( string $path ) : mixed |
Gets file type |
|
get ( string $remote_file, string $local_file = false, integer $offset, integer $length ) : mixed |
Downloads a file from the SFTP server. |
|
getLastSFTPError ( ) : string |
Returns the last error |
|
getSFTPErrors ( ) : string |
Returns all errors |
|
getSFTPLog ( ) : string |
Returns a log of the packets that have been sent and received. |
|
getSupportedVersions ( ) : array |
Get supported SFTP versions |
|
is_dir ( string $path ) : boolean |
Tells whether the filename is a directory |
|
is_file ( string $path ) : boolean |
Tells whether the filename is a regular file |
|
is_link ( string $path ) : boolean |
Tells whether the filename is a symbolic link |
|
is_readable ( string $path ) : boolean |
Tells whether a file exists and is readable |
|
is_writable ( string $path ) : boolean |
Tells whether the filename is writable |
|
is_writeable ( string $path ) : boolean |
Tells whether the filename is writeable |
|
login ( string $username ) : boolean |
Login |
|
lstat ( string $filename ) : mixed |
Returns general information about a file or symbolic link. |
|
mkdir ( string $dir, $mode, $recursive = false ) : boolean |
Creates a directory. |
|
nlist ( string $dir = '.', boolean $recursive = false ) : mixed |
Returns a list of files in the given directory |
|
put ( string $remote_file, string | resource $data, integer $mode = self::SOURCE_STRING, integer $start, integer $local_start, callable | null $progressCallback = null ) : boolean |
Uploads a file to the SFTP server. |
|
pwd ( ) : mixed |
Returns the current directory name |
|
rawlist ( string $dir = '.', boolean $recursive = false ) : mixed |
Returns a detailed list of files in the given directory |
|
readlink ( string $link ) : mixed |
Return the target of a symbolic link |
|
realpath ( string $path ) : mixed |
Returns canonicalized absolute pathname |
|
rename ( string $oldname, string $newname ) : boolean |
Renames a file or a directory on the SFTP server |
|
rmdir ( string $dir ) : boolean |
Removes a directory. |
|
setListOrder ( ) |
Defines how nlist() and rawlist() will be sorted - if at all. |
|
size ( string $filename ) : mixed |
Returns the file size, in bytes, or false, on failure |
|
stat ( string $filename ) : mixed |
Returns general information about a file. |
|
symlink ( string $target, string $link ) : boolean |
Create a symlink |
|
touch ( string $filename, integer $time = null, integer $atime = null ) : boolean |
Sets access and modification time of file. |
|
truncate ( string $filename, integer $new_size ) : boolean |
Truncates a file to a given length |
|