2 * Copyright (c) Meta Platforms, Inc. and affiliates.
4 * This software may be used and distributed according to the terms of the
5 * GNU General Public License version 2.
8 namespace cpp2 facebook.eden.overlay
9 namespace py facebook.eden.overlay
12 typedef string PathComponent
13 typedef string RelativePath
15 // An entry can be in one of three states:
17 // 1. Non-materialized, unknown inode number
18 // 2. Non-materialized, known inode number
19 // 3. Materialized (inode number must be known)
21 // Eventually, once legacy data has been migrated, only states #2 and #3 will
22 // occur. All tree entries will be given an inode number upon allocation,
23 // regardless of whether the entry exists in the overlay.
26 // Holds the mode_t data, which encodes the file type and permissions
27 // Note: eventually this data will be obsoleted by the InodeMetadata table.
29 // The child's inode number. Until legacy data is migrated, this may be zero
30 // or unset. It should never be the case that hash is unset (indicating
31 // materialized) and inodeNumber is zero or unset.
33 // If not materialized, then this child is identical to an existing
34 // source control Tree or Blob. This contains the hash of that Tree or Blob.
35 // If materialized, the hash is either unset or has zero length.
36 3: optional Hash hash;
40 // The contents of this dir.
41 1: map<PathComponent, OverlayEntry> entries;