mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-08 20:41:49 +00:00
add io::last_write_time & add io::write_zip
This commit is contained in:
parent
edb581bee3
commit
57d05bde57
8 changed files with 197 additions and 19 deletions
|
|
@ -8,7 +8,6 @@
|
|||
#include "../path.hpp"
|
||||
|
||||
namespace io {
|
||||
|
||||
/// @brief Device interface for file system operations
|
||||
class Device {
|
||||
public:
|
||||
|
|
@ -28,6 +27,9 @@ namespace io {
|
|||
/// @brief Get file size in bytes
|
||||
virtual size_t size(std::string_view path) = 0;
|
||||
|
||||
/// @brief Get file last write timestamp
|
||||
virtual file_time_type lastWriteTime(std::string_view path) = 0;
|
||||
|
||||
/// @brief Check if file or directory exists
|
||||
virtual bool exists(std::string_view path) = 0;
|
||||
|
||||
|
|
@ -82,6 +84,10 @@ namespace io {
|
|||
return parent->size((root / path).pathPart());
|
||||
}
|
||||
|
||||
file_time_type lastWriteTime(std::string_view path) override {
|
||||
return parent->lastWriteTime((root / path).pathPart());
|
||||
}
|
||||
|
||||
bool exists(std::string_view path) override {
|
||||
return parent->exists((root / path).pathPart());
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue