1 filetransfer.inc final public FileTransfer::chmod($path, $mode, $recursive = FALSE)

Changes the permissions of the specified $path (file or directory).

Parameters

string $path: The file / directory to change the permissions of.

int $mode: The new file permission mode to be passed to chmod().

bool $recursive: Pass TRUE to recursively chmod the entire directory specified in $path.

Throws

FileTransferException

See also

http://php.net/chmod

File

core/includes/filetransfer/filetransfer.inc, line 211
Base FileTransfer class.

Class

FileTransfer
@file Base FileTransfer class.

Code

final public 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);
}