Defines the 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 Drupal root.
Hierarchy
- class \Drupal\Core\FileTransfer\FileTransfer
File
- core/lib/Drupal/Core/FileTransfer/FileTransfer.php, line 14
Namespace
Drupal\Core\FileTransfer
Members
Name | Modifiers | Type | Description |
---|---|---|---|
FileTransfer::$hostname | protected | property | The hostname for this file transfer. |
FileTransfer::$password | protected | property | The password for this file transfer. |
FileTransfer::$port | protected | property | The port for this file transfer. |
FileTransfer::$username | protected | property | The username for this file transfer. |
FileTransfer::checkPath | protected final | function | Checks that the path is inside the jail and throws an exception if not. |
FileTransfer::chmod | public final | function | Changes the permissions of the specified $path (file or directory). |
FileTransfer::connect | abstract public | function | Connects to the server. |
FileTransfer::copyDirectory | public final | function | Copies a directory. |
FileTransfer::copyDirectoryJailed | protected | function | Copies a directory. |
FileTransfer::copyFile | public final | function | Copies a file. |
FileTransfer::copyFileJailed | abstract protected | function | Copies a file. |
FileTransfer::createDirectory | public final | function | Creates a directory. |
FileTransfer::createDirectoryJailed | abstract protected | function | Creates a directory. |
FileTransfer::factory | static | function | Defines a factory method for this class. |
FileTransfer::findChroot | function | Returns the chroot property for this connection. | |
FileTransfer::fixRemotePath | protected final | function | Returns a modified path suitable for passing to the server. |
FileTransfer::getSettingsForm | public | function | Returns a form to collect connection settings credentials. |
FileTransfer::isDirectory | abstract public | function | Checks if a particular path is a directory. |
FileTransfer::isFile | abstract public | function | Checks if a particular path is a file (not a directory). |
FileTransfer::removeDirectory | public final | function | Removes a directory. |
FileTransfer::removeDirectoryJailed | abstract protected | function | Removes a directory. |
FileTransfer::removeFile | public final | function | Removes a file. |
FileTransfer::removeFileJailed | abstract protected | function | Removes a file. |
FileTransfer::sanitizePath | function | Changes backslashes to slashes, also removes a trailing slash. | |
FileTransfer::setChroot | function | Sets the chroot and changes the jail to match the correct path scheme. | |
FileTransfer::__construct | function | Constructs a Drupal\Core\FileTransfer\FileTransfer object. | |
FileTransfer::__get | function | Implements the magic __get() method. |
Please login to continue.