protected function LibraryStream::getDirectoryPath in System stream wrapper 8
Gets the path that the wrapper is responsible for.
Return value
string String specifying the path.
Overrides LocalStream::getDirectoryPath
File
- src/
StreamWrapper/ LibraryStream.php, line 36
Class
- LibraryStream
- Defines the read-only library:// stream wrapper for library files.
Namespace
Drupal\system_stream_wrapper\StreamWrapperCode
protected function getDirectoryPath() {
$library_discovery = new LibraryDiscovery($this
->getDrupalRoot());
/** @var $files \Drupal\Core\Extension\Extension[] */
$files = $library_discovery
->scan(LibraryDiscovery::EXTENSION_TYPE);
$name = $this
->getOwnerName();
return $files[$name]
->getPathname();
}