31 #include <xlnt/xlnt_config.hpp> 32 #include <xlnt/internal/features.hpp> 34 #if XLNT_HAS_INCLUDE(<string_view>) && XLNT_HAS_FEATURE(U8_STRING_VIEW) 35 #include <string_view> 49 static char system_separator();
59 explicit path(
const std::string &path_string);
64 path(
const std::string &path_string,
char sep);
66 #if XLNT_HAS_FEATURE(U8_STRING_VIEW) 67 explicit path(std::u8string_view path_string);
75 path(std::u8string_view path_string,
char sep);
83 bool is_relative()
const;
88 bool is_absolute()
const;
105 std::string filename()
const;
110 std::string extension()
const;
115 std::pair<std::string, std::string> split_extension()
const;
123 std::vector<std::string> split()
const;
129 const std::string &string()
const;
132 std::wstring wstring()
const;
144 path resolve(
const path &base_path)
const;
152 path relative_to(
const path &base_path)
const;
166 bool is_directory()
const;
172 bool is_file()
const;
180 std::string read_contents()
const;
187 path append(
const std::string &to_append)
const;
189 #if XLNT_HAS_FEATURE(U8_STRING_VIEW) 190 path append(std::u8string_view to_append)
const;
199 path append(
const path &to_append)
const;
220 char guess_separator()
const;
225 std::string internal_;
243 static hash<string> hasher;
244 return hasher(p.
string());
const std::string & string() const
Create a string representing this path separated by the provided separator or the system-default sepa...
Definition: cell_reference.hpp:288
size_t operator()(const xlnt::path &p) const
Returns a hashed represenation of the given path.
Definition: path.hpp:241
Enumerates the possible types a cell can be determined by it's current value.
Definition: cell.hpp:36
bool operator!=(std::nullptr_t, const cell &cell)
Returns true if this cell is initialized.
bool operator==(std::nullptr_t, const cell &cell)
Returns true if this cell is uninitialized.
Encapsulates a path that points to location in a filesystem.
Definition: path.hpp:43