1 // 2 // inmemory_filesystem_metadata.hpp 3 // 4 // Copyright © 2024 Apple Inc. All rights reserved. 5 // 6 // Please refer to the license found in the LICENSE file in the root directory of the source tree. 7 8 #pragma once 9 10 #include <string> 11 #include <vector> 12 #include <unordered_map> 13 14 #include "memory_buffer.hpp" 15 #include "range.hpp" 16 17 namespace inmemoryfs { 18 19 struct InMemoryNodeMetadata { 20 std::string name; 21 size_t kind; 22 Range data_region; 23 std::unordered_map<std::string, size_t> child_name_to_indices_map; 24 }; 25 26 struct InMemoryFileSystemMetadata { 27 std::vector<InMemoryNodeMetadata> nodes; 28 }; 29 30 } // namespace inmemoryfs 31