You are here

public function HtaccessWriter::defaultProtectedDirs in Drupal 10

Same name and namespace in other branches
  1. 8 core/lib/Drupal/Core/File/HtaccessWriter.php \Drupal\Core\File\HtaccessWriter::defaultProtectedDirs()
  2. 9 core/lib/Drupal/Core/File/HtaccessWriter.php \Drupal\Core\File\HtaccessWriter::defaultProtectedDirs()

File

core/lib/Drupal/Core/File/HtaccessWriter.php, line 104

Class

HtaccessWriter
Provides functions to manage Apache .htaccess files.

Namespace

Drupal\Core\File

Code

public function defaultProtectedDirs() {
  $protected_dirs[] = new ProtectedDirectory('Public files directory', 'public://');
  if (PrivateStream::basePath()) {
    $protected_dirs[] = new ProtectedDirectory('Private files directory', 'private://', TRUE);
  }
  $protected_dirs[] = new ProtectedDirectory('Temporary files directory', 'temporary://');
  return $protected_dirs;
}