You are here

public static function PrivateStream::basePath in Drupal 8

Same name and namespace in other branches
  1. 9 core/lib/Drupal/Core/StreamWrapper/PrivateStream.php \Drupal\Core\StreamWrapper\PrivateStream::basePath()
  2. 10 core/lib/Drupal/Core/StreamWrapper/PrivateStream.php \Drupal\Core\StreamWrapper\PrivateStream::basePath()

Returns the base path for private://.

Note that this static method is used by \Drupal\system\Form\FileSystemForm so you should alter that form or substitute a different form if you change the class providing the stream_wrapper.private service.

Return value

string The base path for private://.

4 calls to PrivateStream::basePath()
FileSystemForm::buildForm in core/modules/system/src/Form/FileSystemForm.php
Form constructor.
HtaccessWriter::defaultProtectedDirs in core/lib/Drupal/Core/File/HtaccessWriter.php
Returns a list of the default protected directories.
PrivateStream::getDirectoryPath in core/lib/Drupal/Core/StreamWrapper/PrivateStream.php
Gets the path that the wrapper is responsible for.
system_requirements in core/modules/system/system.install
Implements hook_requirements().

File

core/lib/Drupal/Core/StreamWrapper/PrivateStream.php, line 62

Class

PrivateStream
Drupal private (private://) stream wrapper class.

Namespace

Drupal\Core\StreamWrapper

Code

public static function basePath() {
  return Settings::get('file_private_path');
}