function FileTransfer::chmod

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

Parameters

string $path:

long $mode:

bool $recursive:

See also

http://php.net/chmod

File

includes/filetransfer/filetransfer.inc, line 92

Class

FileTransfer

Code

public final function chmod($path, $mode, $recursive = FALSE) {
    if (!in_array('FileTransferChmodInterface', class_implements(get_class($this)))) {
        throw new FileTransferException('Unable to change file permissions');
    }
    $path = $this->sanitizePath($path);
    $path = $this->fixRemotePath($path);
    $this->checkPath($path);
    $this->chmodJailed($path, $mode, $recursive);
}

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