xale-db 1.0
minimal SQL engine, written in c++
Loading...
Searching...
No Matches
IFileManager.h
Go to the documentation of this file.
1#ifndef STORAGE_I_FILE_MANAGER_H
2#define STORAGE_I_FILE_MANAGER_H
3
4#include <filesystem>
5#include <string_view>
6
7namespace Xale::Storage
8{
13 {
14 public:
15 virtual bool open(const std::filesystem::path& path) = 0;
16 virtual void close() = 0;
17 virtual std::size_t readAt(std::uint64_t offset, void* buffer, std::size_t size) = 0;
18 virtual std::size_t writeAt(std::uint64_t offset, const void* buffer, std::size_t size) = 0;
19 virtual bool sync() = 0;
20 virtual std::uint64_t size() const = 0;
21 };
22}
23
24#endif // STORAGE_I_FILE_MANAGER_H
Interface for file management operations.
Definition IFileManager.h:13
virtual std::size_t readAt(std::uint64_t offset, void *buffer, std::size_t size)=0
virtual std::size_t writeAt(std::uint64_t offset, const void *buffer, std::size_t size)=0
virtual bool open(const std::filesystem::path &path)=0
virtual std::uint64_t size() const =0
Definition BinaryFileManager.h:13