@file Base FileTransfer class.
Classes extending this class perform file operations on directories not writable by the webserver. To achieve this, the class should connect back to the server using some backend (for example FTP or SSH). To keep security, the password should always be asked from the user and never stored. For safety, all methods operate only inside a "jail", by default the Backdrop root.
Hierarchy
- class FileTransfer
Expanded class hierarchy of FileTransfer
File
- includes/
filetransfer/ filetransfer.inc, line 14 - Base FileTransfer class.
Members
Name | Modifiers | Type | Description |
---|---|---|---|
FileTransfer:: |
protected | property | |
FileTransfer:: |
protected | property | |
FileTransfer:: |
protected | property | |
FileTransfer:: |
protected | property | |
FileTransfer:: |
protected final | function | Checks that the path is inside the jail and throws an exception if not. |
FileTransfer:: |
public final | function | |
FileTransfer:: |
abstract public | function | Connects to the server. |
FileTransfer:: |
function | The constructor for the UpdateConnection class. This method is also called from the classes that extend this class and override this method. | |
FileTransfer:: |
public final | function | Copies a directory. |
FileTransfer:: |
protected | function | Copies a directory. |
FileTransfer:: |
public final | function | Copies a file. |
FileTransfer:: |
abstract protected | function | Copies a file. |
FileTransfer:: |
public final | function | Creates a directory. |
FileTransfer:: |
abstract protected | function | Creates a directory. |
FileTransfer:: |
static | function | Classes that extend this class must override the factory() static method. |
FileTransfer:: |
function | Returns the chroot property for this connection. | |
FileTransfer:: |
protected final | function | Returns a modified path suitable for passing to the server. If a path is a windows path, makes it POSIX compliant by removing the drive letter. If $this->chroot has a value, it is stripped from the path to allow for chroot'd filetransfer systems. |
FileTransfer:: |
function | Implementation of the magic __get() method. | |
FileTransfer:: |
public | function | Returns a form to collect connection settings credentials. |
FileTransfer:: |
abstract public | function | Checks if a particular path is a directory |
FileTransfer:: |
abstract public | function | Checks if a particular path is a file (not a directory). |
FileTransfer:: |
public final | function | Removes a directory. |
FileTransfer:: |
abstract protected | function | Removes a directory. |
FileTransfer:: |
public final | function | Removes a file. |
FileTransfer:: |
abstract protected | function | Removes a file. |
FileTransfer:: |
function | Changes backslashes to slashes, also removes a trailing slash. | |
FileTransfer:: |
function | Sets the chroot and changes the jail to match the correct path scheme |