stream_wrappers.inc

Drupal stream wrapper interface.

Provides a Drupal interface and classes to implement PHP stream wrappers for public, private, and temporary files.

A stream wrapper is an abstraction of a file system that allows Drupal to use the same set of methods to access both local files and remote resources.

Note that PHP 5.2 fopen() only supports URIs of the form "scheme://target" despite the fact that according to RFC 3986 a URI's scheme component delimiter is in general just ":", not "://". Because of this PHP limitation and for consistency Drupal will only accept URIs of form "scheme://target".

See also

http://www.faqs.org/rfcs/rfc3986.html

http://bugs.php.net/bug.php?id=47070

File

includes/stream_wrappers.inc

Constants

Name Description
STREAM_WRAPPERS_ALL Stream wrapper bit flag -- a filter that matches all wrappers.
STREAM_WRAPPERS_HIDDEN Stream wrapper type flag -- not visible in the UI or accessible via web, but readable and writable. E.g. the temporary directory for uploads.
STREAM_WRAPPERS_LOCAL Stream wrapper bit flag -- refers to a local file system location.
STREAM_WRAPPERS_LOCAL_HIDDEN Stream wrapper type flag -- hidden, readable and writeable using local files.
STREAM_WRAPPERS_LOCAL_NORMAL Stream wrapper type flag -- visible, readable and writeable using local files.
STREAM_WRAPPERS_NORMAL Stream wrapper type flag -- the default when 'type' is omitted from hook_stream_wrappers(). This does not include STREAM_WRAPPERS_LOCAL, because PHP grants a greater trust level to local files (for example, they can be used in an…
STREAM_WRAPPERS_READ Stream wrapper bit flag -- wrapper is readable (almost always true).
STREAM_WRAPPERS_READ_VISIBLE Stream wrapper type flag -- visible and read-only.
STREAM_WRAPPERS_VISIBLE Stream wrapper bit flag -- exposed in the UI and potentially web accessible.
STREAM_WRAPPERS_WRITE Stream wrapper bit flag -- wrapper is writeable.
STREAM_WRAPPERS_WRITE_VISIBLE Stream wrapper type flag -- visible, readable and writeable.

Classes

Name Description
DrupalLocalStreamWrapper Drupal stream wrapper base class for local files.
DrupalPrivateStreamWrapper Drupal private (private://) stream wrapper class.
DrupalPublicStreamWrapper Drupal public (public://) stream wrapper class.
DrupalTemporaryStreamWrapper Drupal temporary (temporary://) stream wrapper class.

Interfaces

Name Description
DrupalStreamWrapperInterface Drupal stream wrapper extension.
StreamWrapperInterface Generic PHP stream wrapper interface.

© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/includes!stream_wrappers.inc/7.x