|
static std::unique_ptr< WriteThroughMemoryBuffer > | GetFile (std::string_view filename, std::error_code &ec, int64_t fileSize=-1) |
|
static std::unique_ptr< WriteThroughMemoryBuffer > | GetFileSlice (std::string_view filename, std::error_code &ec, uint64_t mapSize, uint64_t offset) |
| Map a subrange of the specified file as a ReadWriteMemoryBuffer. More...
|
|
static std::unique_ptr< MemoryBuffer > | GetFile (std::string_view filename, std::error_code &ec, int64_t fileSize=-1) |
| Open the specified file as a MemoryBuffer, returning a new MemoryBuffer if successful, otherwise returning null. More...
|
|
static std::unique_ptr< MemoryBuffer > | GetFileAsStream (std::string_view filename, std::error_code &ec) |
| Read all of the specified file into a MemoryBuffer as a stream (i.e. More...
|
|
static std::unique_ptr< MemoryBuffer > | GetOpenFileSlice (fs::file_t f, std::string_view filename, std::error_code &ec, uint64_t mapSize, int64_t offset) |
| Given an already-open file descriptor, map some slice of it into a MemoryBuffer. More...
|
|
static std::unique_ptr< MemoryBuffer > | GetOpenFile (fs::file_t f, std::string_view filename, std::error_code &ec, uint64_t fileSize) |
| Given an already-open file descriptor, read the file and return a MemoryBuffer. More...
|
|
static std::unique_ptr< MemoryBuffer > | GetMemBuffer (std::span< const uint8_t > inputData, std::string_view bufferName="") |
| Open the specified memory range as a MemoryBuffer. More...
|
|
static std::unique_ptr< MemoryBuffer > | GetMemBuffer (MemoryBufferRef ref) |
|
static std::unique_ptr< MemoryBuffer > | GetMemBufferCopy (std::span< const uint8_t > inputData, std::string_view bufferName="") |
| Open the specified memory range as a MemoryBuffer, copying the contents and taking ownership of it. More...
|
|
static std::unique_ptr< MemoryBuffer > | GetFileSlice (std::string_view filename, std::error_code &ec, uint64_t mapSize, uint64_t offset) |
| Map a subrange of the specified file as a MemoryBuffer. More...
|
|
This class is an extension of MemoryBuffer, which allows write access to the underlying contents and committing those changes to the original source.
It only supports creation methods that are guaranteed to produce a writable buffer. For example, mapping a file read-only is not supported.