Drupal temporary (temporary://) stream wrapper class.
Provides support for storing temporarily accessible files with the Drupal file interface.
Extends DrupalPublicStreamWrapper.
Hierarchy
Properties
| Name | Description |
|---|---|
| DrupalLocalStreamWrapper::$context | Stream context resource. |
| DrupalLocalStreamWrapper::$handle | A generic resource handle. |
| DrupalLocalStreamWrapper::$uri | Instance URI (stream). |
Functions & methods
File
- includes/
stream_wrappers.inc, line 821 - Drupal stream wrapper interface.
View source
class DrupalTemporaryStreamWrapper extends DrupalLocalStreamWrapper {
/**
* Implements abstract public function getDirectoryPath()
*/
public function getDirectoryPath() {
return variable_get('file_temporary_path', file_directory_temp());
}
/**
* Overrides getExternalUrl().
*/
public function getExternalUrl() {
$path = str_replace('\\', '/', $this->getTarget());
return url('system/temporary/' . $path, array('absolute' => TRUE));
}
}