CeresEngine 0.2.0
A game development framework
Loading...
Searching...
No Matches
POSIXFileHandle.hpp
Go to the documentation of this file.
1
2//
3// CeresEngine - A game development framework
4//
5// Created by Rogiel Sulzbach.
6// Copyright (c) 2018-2023 Rogiel Sulzbach. All rights reserved.
7//
8
9#pragma once
10
11#include "Forward.hpp"
12
15
20
22
23#include <memory>
24
25namespace CeresEngine {
26
33
34 private:
35 mutable void* mFileInfo;
36 mutable void* mLinkInfo;
37
38 public:
41 ~POSIXFileHandle() override;
42
43 public: // IFileHandle
45 void updateFileInfo() override;
46
48 [[nodiscard]] Int64 getAccessTime() const override;
49
51 [[nodiscard]] Int64 getModificationTime() const override;
52
53 protected:
54 void readFileInfo() const;
55 void readLinkInfo() const;
56 };
57
58} // namespace CeresEngine
File handle for the local file system.
Definition LocalFileHandle.hpp:21
File handle for the local file system.
Definition POSIXFileHandle.hpp:31
Int64 getModificationTime() const override
Gets time of last modification.
void updateFileInfo() override
Update file information.
void * mFileInfo
Information about the current file (resolves links, created on demand)
Definition POSIXFileHandle.hpp:35
void * mLinkInfo
Information about the current file (does not resolve links, created on demand)
Definition POSIXFileHandle.hpp:36
POSIXFileHandle(POSIXFileSystem &fileSystem, StringView path)
POSIXFileHandle(POSIXFileSystem &fileSystem, String &&path)
Int64 getAccessTime() const override
Gets the time of last access.
Representation of the local file system.
Definition POSIXFileSystem.hpp:26
Definition Application.hpp:19
std::int64_t Int64
Definition DataTypes.hpp:24
constexpr size_t hash(const T &v)
Generates a hash for the provided type.
Definition Hash.hpp:25