You are here

function drupal_chmod in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/includes/file.inc \drupal_chmod()

Sets the permissions on a file or directory.

Deprecated

in Drupal 8.0.x-dev, will be removed before Drupal 9.0.0. Use \Drupal\Core\File\FileSystem::chmod().

Related topics

10 calls to drupal_chmod()
DirectoryTest::testFileCheckDirectoryHandling in core/modules/system/src/Tests/File/DirectoryTest.php
Test directory handling functions.
FileStorage::write in core/lib/Drupal/Core/Config/FileStorage.php
Writes configuration data to the storage.
file_prepare_directory in core/includes/file.inc
Checks that the directory exists and is writable.
file_save_htaccess in core/includes/file.inc
Creates a .htaccess file in the given directory.
file_save_upload in core/modules/file/file.module
Saves file uploads to a new location.

... See full list

File

core/includes/file.inc, line 1024
API for handling file uploads and server file management.

Code

function drupal_chmod($uri, $mode = NULL) {
  return \Drupal::service('file_system')
    ->chmod($uri, $mode);
}