$filesystemMap
$filesystemMap : \Omega\Filesystem\FilesystemMap
Stream wrapper class for the Gaufrette filesystems.
$filesystemMap : \Omega\Filesystem\FilesystemMap
$stream : \Omega\Filesystem\Stream\StreamInterface
stream_open(string $path, string $mode) : bool
Opens a stream to the specified path with the given mode.
This method initializes a stream for the given path by creating it via
createStream()
and then opening it in the specified mode using createStreamMode()
.
The mode determines the type of access (e.g., read, write) that will be performed
on the stream.
string | $path | The full path to the resource to be opened. |
string | $mode | The mode for opening the stream (e.g., 'r', 'w', 'a'). |
Returns true if the stream was successfully opened, or false on failure.
createStream(string $path) : \Omega\Filesystem\Stream\StreamInterface
Creates a stream based on the provided path.
Parses the provided path into components and uses the scheme, host, and path to retrieve the corresponding filesystem from the filesystem map. It then creates and returns a stream for the specified file.
string | $path | The full path to the resource, including scheme and host. |
If the path is invalid or incomplete.
Returns a stream object associated with the given path.
createStreamMode(string $mode) : \Omega\Filesystem\Stream\StreamMode
Creates a StreamMode object based on the provided mode string.
The mode string is typically one of the standard PHP file modes (e.g., 'r', 'w', 'a').
This method wraps the mode in a StreamMode
object that is used to interact
with the underlying stream.
string | $mode | The mode for opening the stream (e.g., 'r', 'w', 'a'). |
Returns a StreamMode
object that encapsulates the given mode.