public final FileTransfer::chmod($path, $mode, $recursive = FALSE)
Changes the permissions of the specified $path (file or directory).
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.
\Drupal\Core\FileTransfer\FileTransferException
public final function chmod($path, $mode, $recursive = FALSE) { if (!($this instanceof ChmodInterface)) { throw new FileTransferException('Unable to change file permissions'); } $path = $this->sanitizePath($path); $path = $this->fixRemotePath($path); $this->checkPath($path); $this->chmodJailed($path, $mode, $recursive); }
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!lib!Drupal!Core!FileTransfer!FileTransfer.php/function/FileTransfer::chmod/8.1.x