contur2
Loading...
Searching...
No Matches
inode.h
Go to the documentation of this file.
1
3
4#pragma once
5
6#include <optional>
7#include <vector>
8
9#include "contur/core/types.h"
10
11namespace contur {
12
14 struct Inode
15 {
18
21
23 std::size_t size = 0;
24
26 std::vector<std::size_t> blocks;
27
29 std::optional<InodeId> parent;
30
33
36 };
37
38} // namespace contur
Definition block.h:15
constexpr InodeId INVALID_INODE_ID
Sentinel value indicating an invalid inode identifier.
Definition types.h:55
std::uint64_t Tick
Simulation clock tick counter.
Definition types.h:18
InodeType
Type of filesystem node.
Definition types.h:37
std::uint32_t InodeId
Unique identifier for a filesystem inode.
Definition types.h:33
Persistent metadata describing a filesystem node.
Definition inode.h:15
std::size_t size
Logical file size in bytes. For directories, this is entry count.
Definition inode.h:23
std::optional< InodeId > parent
Parent inode, if any.
Definition inode.h:29
Tick modifiedAt
Last-modification timestamp in simulation ticks.
Definition inode.h:35
InodeType type
Node type (file or directory).
Definition inode.h:20
Tick createdAt
Creation timestamp in simulation ticks.
Definition inode.h:32
std::vector< std::size_t > blocks
Allocated data block indices owned by this inode.
Definition inode.h:26
Common type aliases, sentinel constants, and forward declarations used throughout the Contur 2 kernel...