HPCloud-PHP
1.2.0
PHP bindings for HPCloud and OpenStack services.
|
Contains the stream wrapper for swiftfs://
URLs.
More...
Go to the source code of this file.
Classes | |
class | StreamWrapperFS |
Provides stream wrapping for Swift like a file system. More... |
Namespaces | |
namespace | HPCloud\Storage\ObjectStorage |
Classes specific to ObjectStorage. |
Contains the stream wrapper for swiftfs://
URLs.
Note, this stream wrapper is in early testing.
The stream wrapper implemented in HPCloud only supports the elements of a stream that are implemented by object storage. This is how the PHP documentation states a stream wrapper should be created. Because some features do not exist, attempting to treat a stream wrapper as if it were a file system will not entirely work. For example, while there are not directories objects have pathy names (with / separators). Directory calls to object storage with the default stream wrappers will not operate how they would for a file system.
StreamWrapperFS is an attempt to make a filesystem like stream wrapper. Hence the protocol is swiftfs standing for swift file system.
To understand how this stream wrapper works start by first reading the documentation on the HPCloud::Storage::ObjectStorage::StreamWrapper.
DIRECTORIES
Because OpenStack Swift does not support directories the swift:// stream wrapper does not support them. This stream wrapper attempts to fake them by faking directory stats, mkdir, and rmdir. By default (see the options below for how to change these) directories have permissions of 777, timestamps close to that of the request, and the user and group called by php. We mock these on the fly though information is stored in the PHP stat cache.
In addition to the parameters supported by StreamWrapper, the following parameters may be set either in the stream context or through HPCloud::Bootstrap::setConfiguration():
Definition in file StreamWrapperFS.php.