Represents a generalized file handle that can reference disk files, embedded assets, or memory streams.
More...
#include <FileHandle.hpp>
|
std::shared_ptr< std::iostream > | open (std::ios_base::openmode ios) |
| Opens the file stream using the specified I/O mode.
|
Represents a generalized file handle that can reference disk files, embedded assets, or memory streams.
◆ LOCATION
Specifies the origin of the file handle.
Enumerator |
---|
PATH | Represents a file path on disk.
|
ASSET | Represents an embedded asset in a package.
|
MEMORY | Represents a stream from memory.
|
◆ open()
std::shared_ptr< std::iostream > dz::FileHandle::open |
( |
std::ios_base::openmode | ios | ) |
|
Opens the file stream using the specified I/O mode.
- Parameters
-
ios | I/O mode flags (e.g., std::ios::in | std::ios::binary). |
- Returns
- A shared pointer to a valid std::iostream instance.
◆ cached_mem_stream
std::shared_ptr<std::iostream> dz::FileHandle::cached_mem_stream |
Cached stream for MEMORY mode.
◆ location
The source type of the file.
◆ path
std::string dz::FileHandle::path |
File path or logical name.
The documentation for this struct was generated from the following file: