Метод |
Описание |
|
__call ( string $method, array $arguments ) : mixed |
Call an internal method or a FTP method handled by the wrapper. |
|
__construct ( resource | null $connection = null ) |
Constructor. |
|
__destruct ( ) |
Close the connection when the object is destroyed. |
|
cleanDir ( string $directory ) : boolean |
Empty directory. |
|
close ( ) : boolean |
Closes the current FTP connection. |
|
connect ( string $host, boolean $ssl = false, integer $port = 21, integer $timeout = 90 ) : FTPClient |
Open a FTP connection. |
|
count ( string $directory = '.', string | null $type = null, boolean $recursive = true ) : integer |
Count the items (file, directory, link, unknown). |
|
dirSize ( string $directory = '.', boolean $recursive = true ) : integer |
Returns the total size of the given directory in bytes. |
|
getConnection ( ) : resource |
Get the connection with the server. |
|
getWrapper ( ) : FtpWrapper |
Get the wrapper. |
|
help ( ) : array |
Get the help information of the remote FTP server. |
|
isDir ( string $directory ) : boolean |
Check if a directory exist. |
|
isEmpty ( string $directory ) : boolean |
Check if a directory is empty. |
|
login ( string $username = 'anonymous', string $password = '' ) : FtpClient |
Logs in to an FTP connection. |
|
mkdir ( string $directory, boolean $recursive = false ) : array |
Creates a directory. |
|
modifiedTime ( string $remoteFile, string | null $format = null ) : integer |
Returns the last modified time of the given file. |
|
nlist ( string $directory = '.', boolean $recursive = false, callable $filter = 'sort' ) : array |
Returns a list of files in the given directory. |
|
parseRawList ( array $rawlist ) : array |
Parse raw list. |
|
putAll ( string $source_directory, string $target_directory, integer $mode = FTP_BINARY ) : FtpClient |
Upload files. |
|
putFromPath ( string $local_file ) : FtpClient |
Uploads a file to the server. |
|
putFromString ( string $remote_file, string $content ) : FtpClient |
Uploads a file to the server from a string. |
|
rawToType ( string $permission ) : string |
Convert raw info (drwx---r-x . |
|
rawlist ( string $directory = '.', boolean $recursive = false ) : array |
Returns a detailed list of files in the given directory. |
|
remove ( string $path, boolean $recursive = false ) : boolean |
Remove a file or a directory. |
|
rmdir ( string $directory, boolean $recursive = true ) : boolean |
Remove a directory. |
|
scanDir ( string $directory = '.', boolean $recursive = false ) : array |
Scan a directory and returns the details of each item. |
|
setPhpLimit ( string | null $memory = null, integer $time_limit, boolean $ignore_user_abort = true ) : FtpClient |
Overwrites the PHP limit |
|
up ( ) : FtpClient |
Changes to the parent directory. |
|