11 #include <gstring.hpp>
19 bool openFile(std::ifstream&, GString
const& path,
const char* locale =
nullptr);
24 bool openFile(std::ofstream&, GString
const& path,
const char* locale =
nullptr);
28 class GIFile :
public std::ifstream {
30 GIFile(GString
const& path,
const char* locale = {}) {
31 openFile(*
this, path, locale);
36 class GOFile :
public std::ofstream {
38 GOFile(GString
const& path,
const char* locale = {}) {
39 openFile(*
this, path, locale);
49 GString normPath(GString
const& path,
bool add_slash =
false);
53 bool fileExist(GString
const& path);
57 bool copyFile(GString
const& from_file, GString
const& to_file);
60 int system(GString
const& command);
63 bool makeDir(GString
const& path);
66 GString parentPath(GString
const& path);
70 GString basename(GString
const& path,
bool with_extension =
true);
73 GString dirname(GString
const& path);
77 GString extname(GString
const& path,
bool with_dot =
true);