static std::string make_relative(const std::string &base_path, const std::string &absolute_path, FilePathType path_type=FilePathType::file_system)
Changes a path to be relative to the specified base path, if possible.
Native file system path. (On windows, '/' are turned into '\'. On linux, '\' are turned into '/') ...
static std::string add_trailing_slash(const std::string &path, FilePathType path_type=FilePathType::file_system)
Add trailing slash or backslash to path.
static std::string basepath(const std::string &path, FilePathType path_type=FilePathType::file_system)
Returns a new path with the last path component removed.
static std::string remove_trailing_slash(const std::string &path)
Remove trailing slash or backslash from path.
static std::string location(const std::string &path)
Returns the drive (C:) or share name ( \ \ computer \ share)
FilePathType
File path types.
Definition: path_help.h:36
Path helper functions.
Definition: path_help.h:46
static std::string combine(const std::string &part1, const std::string &part2, FilePathType path_type=FilePathType::file_system)
Concatenates two strings into one adding a trailing slash to first string if missing.
Path using slashes ('/').
static std::string extension(const std::string &path, FilePathType path_type=FilePathType::file_system)
Returns the extension part (includes the dot) of a path.
static bool has_extension(const std::string &path, const std::string &extension, FilePathType path_type=FilePathType::file_system)
Checks if the path has the specified extension.
static std::string filename(const std::string &path, FilePathType path_type=FilePathType::file_system)
Returns the filename part of a path.
static std::string absolute_path(std::string path)
Returns the absolute file system path for the given path.
static std::string filename_without_extension(const std::string &path, FilePathType path_type=FilePathType::file_system)
Returns the filename part without the extension.
static bool is_absolute(const std::string &path, FilePathType path_type=FilePathType::file_system)
Check if a path is absolute.
static std::string make_absolute(const std::string &base_path, const std::string &relative_path, FilePathType path_type=FilePathType::file_system)
Changes a path to be relative to the specified base path, if possible.
static std::string normalize(const std::string &path, FilePathType path_type=FilePathType::file_system)
Normalize a path.
Definition: Application/application.h:35
static bool is_relative(const std::string &path, FilePathType path_type=FilePathType::file_system)
Check if a path is relative.