Concrete implementation of IFileManager for binary file operations.
More...
#include <BinaryFileManager.h>
|
| | BinaryFileManager () |
| | Constructor for BinaryFileManager.
|
| | BinaryFileManager (const BinaryFileManager &)=delete |
| | ~BinaryFileManager () |
| | Destructor for BinaryFileManager.
|
| bool | open (const std::filesystem::path &path) override |
| | Opens a binary file at the specified path.
|
| void | close () override |
| | Closes the currently opened binary file.
|
| std::size_t | readAt (std::uint64_t offset, void *buffer, std::size_t size) override |
| | Reads data from the binary file at the specified offset into the provided buffer.
|
| std::size_t | writeAt (std::uint64_t offset, const void *buffer, std::size_t size) override |
| | Writes data to the binary file at the specified offset from the provided buffer.
|
| bool | sync () override |
| | Synchronizes the binary file to ensure all data is written to disk.
|
| std::uint64_t | size () const override |
| | Gets the size of the binary file.
|
| BinaryFileManager & | operator= (const BinaryFileManager &)=delete |
Concrete implementation of IFileManager for binary file operations.
◆ BinaryFileManager() [1/2]
| Xale::Storage::BinaryFileManager::BinaryFileManager |
( |
| ) |
|
◆ BinaryFileManager() [2/2]
| Xale::Storage::BinaryFileManager::BinaryFileManager |
( |
const BinaryFileManager & | | ) |
|
|
delete |
◆ ~BinaryFileManager()
| Xale::Storage::BinaryFileManager::~BinaryFileManager |
( |
| ) |
|
◆ close()
| void Xale::Storage::BinaryFileManager::close |
( |
| ) |
|
|
overridevirtual |
◆ open()
| bool Xale::Storage::BinaryFileManager::open |
( |
const std::filesystem::path & | path | ) |
|
|
overridevirtual |
Opens a binary file at the specified path.
- Parameters
-
| path | The file path to open |
- Returns
- true if the file is opened successfully, false otherwise
Implements Xale::Storage::IFileManager.
◆ operator=()
◆ readAt()
| std::size_t Xale::Storage::BinaryFileManager::readAt |
( |
std::uint64_t | offset, |
|
|
void * | buffer, |
|
|
std::size_t | size ) |
|
overridevirtual |
Reads data from the binary file at the specified offset into the provided buffer.
- Parameters
-
| offset | The offset in the file to start reading from |
| buffer | The buffer to read data into |
| size | The number of bytes to read |
- Returns
- The number of bytes actually read
Implements Xale::Storage::IFileManager.
◆ size()
| std::uint64_t Xale::Storage::BinaryFileManager::size |
( |
| ) |
const |
|
overridevirtual |
◆ sync()
| bool Xale::Storage::BinaryFileManager::sync |
( |
| ) |
|
|
overridevirtual |
Synchronizes the binary file to ensure all data is written to disk.
- Returns
- true if the synchronization is successful, false otherwise
Implements Xale::Storage::IFileManager.
◆ writeAt()
| std::size_t Xale::Storage::BinaryFileManager::writeAt |
( |
std::uint64_t | offset, |
|
|
const void * | buffer, |
|
|
std::size_t | size ) |
|
overridevirtual |
Writes data to the binary file at the specified offset from the provided buffer.
- Parameters
-
| offset | The offset in the file to start writing to |
| buffer | The buffer containing data to write |
| size | The number of bytes write |
Implements Xale::Storage::IFileManager.
The documentation for this class was generated from the following files: