3.6.0
|
|
Freundlich's C++ toolkit |
Helper functions for std::filesystem. More...
Classes | |
class | directory_range |
A range for directory iterators. More... | |
class | recursive_directory_range |
A range for recursive directory iterators. More... | |
Typedefs | |
using | fstream = std::basic_fstream< fcppt::char_type > |
Typedef to basic_fstream , depending on fcppt::char_type. More... | |
using | ifstream = std::basic_ifstream< fcppt::char_type > |
Typedef to basic_ifstream , depending on fcppt::char_type. More... | |
using | ofstream = std::basic_ofstream< fcppt::char_type > |
Typedef to basic_ofstream , depending on fcppt::char_type. More... | |
using | optional_size = fcppt::optional::object< std::uintmax_t > |
Optional size. More... | |
Functions | |
FCPPT_FILESYSTEM_DETAIL_SYMBOL fcppt::optional_error_code | create_directories_recursive (std::filesystem::path const &path) |
Tries to creates directories recursively. More... | |
FCPPT_FILESYSTEM_DETAIL_SYMBOL fcppt::optional_error_code | create_directory (std::filesystem::path const &path) |
Tries to create a directory. More... | |
FCPPT_FILESYSTEM_DETAIL_SYMBOL fcppt::string | extension (std::filesystem::path const &path) |
Returns the extension of a path as string. More... | |
FCPPT_FILESYSTEM_DETAIL_SYMBOL fcppt::string | extension_without_dot (std::filesystem::path const &path) |
Returns the extension of a path as string without the dot. More... | |
FCPPT_FILESYSTEM_DETAIL_SYMBOL fcppt::filesystem::optional_size | file_size (std::filesystem::path const &path) |
Returns the size of a file. More... | |
FCPPT_FILESYSTEM_DETAIL_SYMBOL fcppt::either::object< std::error_code, fcppt::filesystem::directory_range > | make_directory_range (std::filesystem::path const &, std::filesystem::directory_options) |
Creates a directory range. More... | |
FCPPT_FILESYSTEM_DETAIL_SYMBOL fcppt::either::object< std::error_code, fcppt::filesystem::recursive_directory_range > | make_recursive_directory_range (std::filesystem::path const &, std::filesystem::directory_options) |
Creates a recursive directory range. More... | |
FCPPT_FILESYSTEM_DETAIL_SYMBOL std::filesystem::path | normalize (std::filesystem::path const &path) |
Normalizes a path by removing trailing slashes. More... | |
FCPPT_FILESYSTEM_DETAIL_SYMBOL std::size_t | num_subpaths (std::filesystem::path const &path) |
Returns how many sub-paths a path has. More... | |
template<typename Stream > | |
fcppt::optional::object< Stream > | open (std::filesystem::path const &_path, std::ios_base::openmode const _openmode) |
Opens a file, returning an optional. More... | |
template<typename Stream , typename Exception = fcppt::exception> | |
Stream | open_exn (std::filesystem::path const &_path, std::ios_base::openmode const _openmode) |
Opens a file, throwing an exception on failure. More... | |
FCPPT_FILESYSTEM_DETAIL_SYMBOL fcppt::string | path_to_string (std::filesystem::path const &path) |
Turns a path into an fcppt::string. More... | |
FCPPT_FILESYSTEM_DETAIL_SYMBOL std::filesystem::path | remove_extension (std::filesystem::path const &path) |
Removes the extension from a path. More... | |
FCPPT_FILESYSTEM_DETAIL_SYMBOL std::filesystem::path | replace_extension (std::filesystem::path const &path, fcppt::string_view const &new_extension) |
Replaces the extension of a path. More... | |
FCPPT_FILESYSTEM_DETAIL_SYMBOL fcppt::string | stem (std::filesystem::path const &path) |
Returns the stem of a path as a string. More... | |
FCPPT_FILESYSTEM_DETAIL_SYMBOL std::filesystem::path | strip_prefix (std::filesystem::path const &prefix, std::filesystem::path const &path) |
Strips a prefix from a path. More... | |
Helper functions for std::filesystem.