function HtaccessWriter::defaultProtectedDirs
Returns a list of the default protected directories.
Return value
\Drupal\Core\File\ProtectedDirectory[] The default protected directories.
Overrides HtaccessWriterInterface::defaultProtectedDirs
1 call to HtaccessWriter::defaultProtectedDirs()
- HtaccessWriter::ensure in core/
lib/ Drupal/ Core/ File/ HtaccessWriter.php  - Creates a .htaccess file in each Drupal files directory if it is missing.
 
File
- 
              core/
lib/ Drupal/ Core/ File/ HtaccessWriter.php, line 104  
Class
- HtaccessWriter
 - Provides functions to manage Apache .htaccess files.
 
Namespace
Drupal\Core\FileCode
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;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.