function file_default_scheme
Same name in other branches
- 7.x includes/file.inc \file_default_scheme()
Gets the default file stream implementation.
Return value
string 'public', 'private' or any other file scheme defined as the default.
Deprecated
in drupal:8.8.0 and is removed from drupal:9.0.0. Use \Drupal::config('system.file')->get('default_scheme') instead.
See also
https://www.drupal.org/node/3049030
Related topics
3 calls to file_default_scheme()
- FileManagedTestBase::createUri in core/
modules/ file/ src/ Tests/ FileManagedTestBase.php - Creates a file and returns its URI.
- FileSystemDeprecationTest::testDeprecatedDefaultScheme in core/
tests/ Drupal/ KernelTests/ Core/ File/ FileSystemDeprecationTest.php - @expectedDeprecation file_default_scheme() is deprecated in drupal:8.8.0. It will be removed from drupal:9.0.0. Use \Drupal::config('system.file')->get('default_scheme') instead. See https://www.drupal.org/node/3049030
- file_unmanaged_save_data in core/
includes/ file.inc - Saves a file to the specified destination without invoking file API.
1 string reference to 'file_default_scheme'
- FileSystemForm::submitForm in core/
modules/ system/ src/ Form/ FileSystemForm.php - Form submission handler.
File
-
core/
includes/ file.inc, line 157
Code
function file_default_scheme() {
@trigger_error('file_default_scheme() is deprecated in drupal:8.8.0. It will be removed from drupal:9.0.0. Use \\Drupal::config(\'system.file\')->get(\'default_scheme\') instead. See https://www.drupal.org/node/3049030', E_USER_DEPRECATED);
return \Drupal::config('system.file')->get('default_scheme');
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.