public getStreamByResourcePath ( string $relativePath ) : resource | boolean | ||
$relativePath | string | A path relative to the storage root, for example "MyFirstDirectory/SecondDirectory/Foo.css" |
return | resource | boolean | | boolean A URI (for example the full path and filename) leading to the resource file or FALSE if it does not exist |
public function getStreamByResourcePath($relativePath)
{
$pathAndFilename = $this->path . ltrim($relativePath, '/');
return file_exists($pathAndFilename) ? fopen($pathAndFilename, 'r') : false;
}