function LocalStream::chmod

Implements Drupal\Core\StreamWrapper\StreamWrapperInterface::chmod().

Overrides StreamWrapperInterface::chmod

1 method overrides LocalStream::chmod()
LocalReadOnlyStream::chmod in drupal/core/lib/Drupal/Core/StreamWrapper/LocalReadOnlyStream.php
Support for chmod().

File

drupal/core/lib/Drupal/Core/StreamWrapper/LocalStream.php, line 131
Definition of Drupal\Core\StreamWrapper\LocalStream.

Class

LocalStream
Defines a Drupal stream wrapper base class for local files.

Namespace

Drupal\Core\StreamWrapper

Code

function chmod($mode) {
  $output = @chmod($this
    ->getLocalPath(), $mode);

  // We are modifying the underlying file here, so we have to clear the stat
  // cache so that PHP understands that URI has changed too.
  clearstatcache(TRUE, $this
    ->getLocalPath());
  return $output;
}