function Image::chmod
Provides a wrapper for drupal_chmod() to allow unit testing.
Parameters
string $uri: A string containing a URI file, or directory path.
int $mode: Integer value for the permissions. Consult PHP chmod() documentation for more information.
Return value
bool TRUE for success, FALSE in the event of an error.
Deprecated
in drupal:8.0.0 and is removed from drupal:9.0.0. Use \Drupal\Core\File\FileSystem::chmod().
See also
\Drupal\Core\File\FileSystemInterface::chmod()
https://www.drupal.org/node/2418133
File
-
core/
lib/ Drupal/ Core/ Image/ Image.php, line 219
Class
- Image
- Defines an image object to represent an image file.
Namespace
Drupal\Core\ImageCode
protected function chmod($uri, $mode = NULL) {
@trigger_error('chmod() is deprecated in Drupal 8.0.0 and will be removed before Drupal 9.0.0. Use \\Drupal\\Core\\File\\FileSystemInterface::chmod(). See https://www.drupal.org/node/2418133.', E_USER_DEPRECATED);
return \Drupal::service('file_system')->chmod($uri, $mode);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.