3#include "unordered_dense.h"
9#define WIN32_LEAN_AND_MEAN
19 std::vector<native_string> ordered_roots;
20 std::vector<native_string> ignored_paths;
22 void operator=(file_system
const& other) =
delete;
23 void operator=(file_system&& other) =
delete;
28 friend void reset(file_system& fs);
32 friend directory
get_root(file_system
const& fs);
39 friend std::vector<native_string>
list_roots(file_system
const& fs);
45 file_system
const* parent_system =
nullptr;
49 : relative_path(relative_path), parent_system(parent_system) { }
69 : file_name(file_name), absolute_path(absolute_path) { }
78 HANDLE file_handle = INVALID_HANDLE_VALUE;
79 HANDLE mapping_handle =
nullptr;
82 file_contents content;
96 friend class std::optional<
file>;
friend std::vector< directory > list_subdirectories(directory const &dir)
friend std::optional< unopened_file > peek_file(directory const &dir, native_string_view file_name)
friend native_string get_full_name(directory const &dir)
directory(file_system const *parent_system, native_string_view relative_path)
friend std::optional< file > open_file(directory const &dir, native_string_view file_name)
friend void write_file(directory const &dir, native_string_view file_name, char const *file_data, uint32_t file_size)
friend directory open_directory(directory const &dir, native_string_view directory_name)
friend std::vector< unopened_file > list_files(directory const &dir, native_char const *extension)
friend directory get_root(file_system const &fs)
friend std::optional< native_string > get_path_to_file(directory const &dir, native_string_view file_name)
friend std::vector< directory > list_subdirectories(directory const &dir)
friend std::optional< unopened_file > peek_file(directory const &dir, native_string_view file_name)
friend void add_root(file_system &fs, native_string_view root_path)
friend bool is_ignored_path(file_system const &fs, native_string_view path)
friend void reset(file_system &fs)
friend native_string extract_state(file_system const &fs)
friend std::optional< file > open_file(directory const &dir, native_string_view file_name)
friend void add_relative_root(file_system &fs, native_string_view root_path)
friend void restore_state(file_system &fs, native_string_view data)
friend void add_ignore_path(file_system &fs, native_string_view replaced_path)
friend std::vector< unopened_file > list_files(directory const &dir, native_char const *extension)
friend directory get_root(file_system const &fs)
friend std::optional< native_string > get_path_to_file(directory const &dir, native_string_view file_name)
friend std::vector< native_string > list_roots(file_system const &fs)
friend file_contents view_contents(file const &f)
void operator=(file &&other) noexcept
friend native_string get_full_name(file const &f)
file(file const &other)=delete
friend std::optional< file > open_file(directory const &dir, native_string_view file_name)
void operator=(file const &other)=delete
file(file &&other) noexcept
unopened_file(native_string_view absolute_path, native_string_view file_name)
friend native_string get_full_name(unopened_file const &f)
friend native_string get_file_name(unopened_file const &f)
friend std::vector< unopened_file > list_files(directory const &dir, native_char const *extension)
friend std::optional< file > open_file(unopened_file const &f)
std::string_view native_string_view
std::string native_string