Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. FileSystem.php

function FileSystem::chmod

Same name in this branch
  1. 11.1.x vendor/symfony/filesystem/Filesystem.php \Symfony\Component\Filesystem\Filesystem::chmod()

Overrides FileSystemInterface::chmod

3 calls to FileSystem::chmod()
FileSystem::copy in core/lib/Drupal/Core/File/FileSystem.php
Copies a file to a new location without invoking the file API.
FileSystem::move in core/lib/Drupal/Core/File/FileSystem.php
Moves a file to a new location without database changes or hook invocation.
FileSystem::prepareDirectory in core/lib/Drupal/Core/File/FileSystem.php
Checks that the directory exists and is writable.

File

core/lib/Drupal/Core/File/FileSystem.php, line 94

Class

FileSystem
Provides helpers to operate on files and stream wrappers.

Namespace

Drupal\Core\File

Code

public function chmod($uri, $mode = NULL) {
    if (!isset($mode)) {
        if (is_dir($uri)) {
            $mode = $this->settings
                ->get('file_chmod_directory', static::CHMOD_DIRECTORY);
        }
        else {
            $mode = $this->settings
                ->get('file_chmod_file', static::CHMOD_FILE);
        }
    }
    return @chmod($uri, $mode);
}
RSS feed
Powered by Drupal