32 #include "../api_core.h"
103 static std::string make_absolute(
104 const std::string &base_path,
105 const std::string &relative_path,
106 PathType path_type = path_type_file);
127 static std::string make_relative(
128 const std::string &base_path,
129 const std::string &absolute_path,
130 PathType path_type = path_type_file);
137 static bool is_absolute(
138 const std::string &path,
139 PathType path_type = path_type_file);
146 static bool is_relative(
147 const std::string &path,
148 PathType path_type = path_type_file);
159 static std::string normalize(
160 const std::string &path,
161 PathType path_type = path_type_file);
170 static std::string add_trailing_slash(
171 const std::string &path,
172 PathType path_type = path_type_file);
180 static std::string remove_trailing_slash(
181 const std::string &path);
189 static std::string get_location(
190 const std::string &fullname,
191 PathType path_type = path_type_file);
200 static std::string get_basepath(
201 const std::string &fullname,
202 PathType path_type = path_type_file);
208 static std::vector<std::string> split_basepath(
209 const std::string &fullname,
210 PathType path_type = path_type_file);
216 static std::string get_fullpath(
217 const std::string &fullname,
218 PathType path_type = path_type_file);
224 static std::string get_filename(
225 const std::string &fullname,
226 PathType path_type = path_type_file);
232 static std::string get_basename(
233 const std::string &fullname,
234 PathType path_type = path_type_file);
241 static std::string get_extension(
242 const std::string &fullname,
243 PathType path_type = path_type_file);
250 static std::string get_fullname(
251 const std::string &fullpath,
252 const std::string &filename,
253 PathType path_type = path_type_file);
261 static std::string get_fullname(
262 const std::string &fullpath,
263 const std::string &filename,
264 const std::string &extension,
265 PathType path_type = path_type_file);
274 static std::string get_fullname(
275 const std::string &location,
276 const std::string &basepath,
277 const std::string &filename,
278 const std::string &extension,
279 PathType path_type = path_type_file);
285 static std::string combine(
const std::string &part1,
const std::string &part2, PathType path_type = path_type_file);
PathType
Path types.
Definition: path_help.h:48
Native file system path. (On windows, '/' are turned into '\'. On linux, '\' are turned into '/') ...
Definition: path_help.h:51
Path helper functions.
Definition: path_help.h:41