|
virtual | ~PositionalFile ()=default |
| Destructor. More...
|
|
virtual Status | SetHeadBuffer (int64_t size)=0 |
| Sets the head buffer to cache the beginning region of the file. More...
|
|
virtual Status | SetAccessStrategy (int64_t block_size, int32_t options)=0 |
| Sets access strategy. More...
|
|
virtual int64_t | GetBlockSize () const =0 |
| Gets the block size. More...
|
|
virtual bool | IsDirectIO () const =0 |
| Checks whether the access mode is direct I/O. More...
|
|
virtual | ~File ()=default |
| Destructor. More...
|
|
virtual Status | Open (const std::string &path, bool writable, int32_t options=OPEN_DEFAULT)=0 |
| Opens a file. More...
|
|
virtual Status | Close ()=0 |
| Closes the file. More...
|
|
virtual Status | Read (int64_t off, void *buf, size_t size)=0 |
| Reads data. More...
|
|
virtual std::string | ReadSimple (int64_t off, size_t size) |
| Reads data, in a simple way. More...
|
|
virtual Status | Write (int64_t off, const void *buf, size_t size)=0 |
| Writes data. More...
|
|
virtual bool | WriteSimple (int64_t off, std::string_view data) |
| Writes data, in a simple way. More...
|
|
virtual Status | Append (const void *buf, size_t size, int64_t *off=nullptr)=0 |
| Appends data at the end of the file. More...
|
|
virtual int64_t | AppendSimple (const std::string &data) |
| Appends data at the end of the file, in a simple way. More...
|
|
virtual Status | Expand (size_t inc_size, int64_t *old_size=nullptr)=0 |
| Expands the file size without writing data. More...
|
|
virtual int64_t | ExpandSimple (size_t inc_size) |
| Expands the file size without writing data, in a simple way. More...
|
|
virtual Status | Truncate (int64_t size)=0 |
| Truncates the file. More...
|
|
virtual Status | TruncateFakely (int64_t size)=0 |
| Truncate the file fakely. More...
|
|
virtual Status | Synchronize (bool hard)=0 |
| Synchronizes the content of the file to the file system. More...
|
|
virtual Status | GetSize (int64_t *size)=0 |
| Gets the size of the file. More...
|
|
virtual int64_t | GetSizeSimple () |
| Gets the size of the file, in a simple way. More...
|
|
virtual Status | SetAllocationStrategy (int64_t init_size, double inc_factor)=0 |
| Sets allocation strategy. More...
|
|
virtual Status | CopyProperties (File *file)=0 |
| Copies internal properties to another file object. More...
|
|
virtual Status | GetPath (std::string *path)=0 |
| Gets the path of the file. More...
|
|
virtual std::string | GetPathSimple () |
| Gets the path of the file, in a simple way. More...
|
|
virtual Status | Rename (const std::string &new_path)=0 |
| Renames the file. More...
|
|
virtual Status | DisablePathOperations ()=0 |
| Disables operations related to the path. More...
|
|
virtual bool | IsMemoryMapping () const =0 |
| Checks whether operations are done by memory mapping. More...
|
|
virtual bool | IsAtomic () const =0 |
| Checks whether updating operations are atomic and thread-safe. More...
|
|
virtual std::unique_ptr< File > | MakeFile () const =0 |
| Makes a new file object of the same concrete class. More...
|
|
Interface for positional access file implementations.