function FTPExtension::createDirectoryJailed

Same name in other branches
  1. 9 core/lib/Drupal/Core/FileTransfer/FTPExtension.php \Drupal\Core\FileTransfer\FTPExtension::createDirectoryJailed()
  2. 8.9.x core/lib/Drupal/Core/FileTransfer/FTPExtension.php \Drupal\Core\FileTransfer\FTPExtension::createDirectoryJailed()
  3. 10 core/lib/Drupal/Core/FileTransfer/FTPExtension.php \Drupal\Core\FileTransfer\FTPExtension::createDirectoryJailed()

Overrides FileTransfer::createDirectoryJailed

File

core/lib/Drupal/Core/FileTransfer/FTPExtension.php, line 36

Class

FTPExtension
Defines a file transfer class using the PHP FTP extension.

Namespace

Drupal\Core\FileTransfer

Code

protected function createDirectoryJailed($directory) {
    if (!ftp_mkdir($this->connection, $directory)) {
        throw new FileTransferException("Cannot create directory @directory", 0, [
            "@directory" => $directory,
        ]);
    }
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.