9#ifndef MAXOS_FILESYSTEM_PATH_H
10#define MAXOS_FILESYSTEM_PATH_H
15namespace MaxOS::filesystem {
23 static bool valid(
const string& path);
24 static bool is_file(
const string& path);
26 static string file_name(
const string& path);
28 static string file_path(
const string& path);
34 static string join_path(
const string& base,
const string& extended);
Handles file & directory paths.
static string file_extension(const string &path)
Try to get the file extension from a path (assumes split by ".")
static string parent_directory(const string &path)
Get the parent directory of the path.
static bool valid(const string &path)
Check if a path is valid.
static bool is_file(const string &path)
Check if a path is a file.
static string file_name(const string &path)
Get the file name component of a path if it exists or an empty string.
static string top_directory(const string &path)
Get the top directory of a path.
static string file_path(const string &path)
Finds the path to the directory the file is in.
static string join_path(const string &base, const string &extended)
Joins two paths together.
static string absolute_path(const string &path)
Calculates path with out any "../" or "./".
Defines a String class for dynamically sized strings with various operations.