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;
104 std::string filename()
const;
109 std::string extension()
const;
114 std::pair<std::string, std::string> split_extension()
const;
122 std::vector<std::string> split()
const;
128 const std::string &string()
const;
131 std::wstring wstring()
const;
143 path resolve(
const path &base_path)
const;
150 path relative_to(
const path &base_path)
const;
164 bool is_directory()
const;
170 bool is_file()
const;
178 std::string read_contents()
const;
185 path append(
const std::string &to_append)
const;
187 #if XLNT_HAS_FEATURE(U8_STRING_VIEW) 188 path append(std::u8string_view to_append)
const;
197 path append(
const path &to_append)
const;
218 char guess_separator()
const;
223 std::string internal_;
241 static hash<string> hasher;
242 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:262
size_t operator()(const xlnt::path &p) const
Returns a hashed represenation of the given path.
Definition: path.hpp:239
Enumerates the possible types a cell can be determined by it's current value.
Definition: cell.hpp:37
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
bool operator!=(const std::string &reference_string, const range_reference &ref)
Returns true if the string representation of the range is not equivalent to ref.