3#include "unordered_dense.h"
11 std::vector<native_string> ordered_roots;
12 std::vector<native_string> ignored_paths;
40 : parent_system(parent_system), relative_path(relative_path) { }
59 : absolute_path(absolute_path), file_name(file_name) { }
68 int file_descriptor = -1;
69#if defined(_GNU_SOURCE) || defined(_DEFAULT_SOURCE) || defined(_BSD_SOURCE) || defined(_SVID_SOURCE)
70 void* mapping_handle =
nullptr;
72 void* file_buffer =
nullptr;
90 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::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::vector< native_string > list_roots(file_system const &fs)
friend file_contents view_contents(file const &f)
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
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