FtpClient\FtpClient
The FTP and SSL-FTP client for PHP.
- Author: Nicolas Tallefourtane <dev@nicolab.net>
Synopsis
class FtpClient
implements
Countable
{
- // methods
- public void __construct()
- public void __destruct()
- public mixed __call()
- public FtpClient setPhpLimit()
- public array help()
- public FTPClient connect()
- public bool close()
- public resource getConnection()
- public FtpWrapper getWrapper()
- public FtpClient login()
- public int modifiedTime()
- public FtpClient up()
- public array nlist()
- public array mkdir()
- public bool rmdir()
- public bool cleanDir()
- public bool remove()
- public bool isDir()
- public bool isEmpty()
- public array scanDir()
- public int dirSize()
- public int count()
- public FtpClient putFromString()
- public FtpClient putFromPath()
- public FtpClient putAll()
- public array rawlist()
- public array parseRawList()
- public string rawToType()
- protected FtpClient setWrapper()
Hierarchy
Implements
Members
private
- $ftp
—
FtpClient\FtpWrapper
PHP FTP functions wrapper.
protected
- $conn
—
resource
The connection with the server.
Methods
protected
- setWrapper() — Set the wrapper which forward the PHP FTP functions to use in FtpClient instance.
public
- __construct() — Constructor.
- __destruct() — Close the connection when the object is destroyed.
- __call() — Call an internal method or a FTP method handled by the wrapper.
- cleanDir() — Empty directory.
- close() — Closes the current FTP connection.
- connect() — Open a FTP connection.
- count() — Count the items (file, directory, link, unknown).
- dirSize() — Returns the total size of the given directory in bytes.
- getConnection() — Get the connection with the server.
- getWrapper() — Get the wrapper.
- help() — Get the help information of the remote FTP server.
- isDir() — Check if a directory exist.
- isEmpty() — Check if a directory is empty.
- login() — Logs in to an FTP connection.
- mkdir() — Creates a directory.
- modifiedTime() — Returns the last modified time of the given file.
- nlist() — Returns a list of files in the given directory.
- parseRawList() — Parse raw list.
- putAll() — Upload files.
- putFromPath() — Uploads a file to the server.
- putFromString() — Uploads a file to the server from a string.
- rawToType() — Convert raw info (drwx---r-x ...) to type (file, directory, link, unknown).
- rawlist() — Returns a detailed list of files in the given directory.
- remove() — Remove a file or a directory.
- rmdir() — Remove a directory.
- scanDir() — Scan a directory and returns the details of each item.
- setPhpLimit() — Overwrites the PHP limit
- up() — Changes to the parent directory.