44 FileName(
const string & filename) : string(filename) {}
56 string base(
bool ext=
true)
const;
59 string ext(
bool dot=
true)
const;
63 void set(
const string & filename) {*
this=filename;}
64 void setBase(
const string & basename,
bool ext=
true);
65 void setExt(
const string & extension);
66 void setPath(
const string & path);
77 #if defined(_WIN32) || defined(_WIN64) 78 static char delim() {
return '\\';}
79 #define snprintf _snprintf 80 #define vsnprintf _vsnprintf 81 #define strcasecmp _stricmp 82 #define strncasecmp _strnicmp 84 static char delim() {
return '/';}
85 #endif // _WIN32 ||_WIN64 FileName()
Definition: filename.h:43
string ext(bool dot=true) const
Definition: filename.cpp:70
void setExt(const string &extension)
Definition: filename.cpp:92
[std::string] extension for filenames
Definition: filename.h:39
void setPath(const string &path)
Definition: filename.cpp:105
FileName(const string &filename)
Definition: filename.h:44
static void setCaseSensitiveCompare(bool csc)
Definition: filename.h:74
string qualified() const
Definition: filename.cpp:44
static char delim()
Definition: filename.h:84
bool operator==(const FileName &fn)
Definition: filename.cpp:36
~FileName()
Definition: filename.h:45
void setBase(const string &basename, bool ext=true)
Definition: filename.cpp:81
string path() const
Definition: filename.cpp:60
string relpath() const
Definition: filename.cpp:62
static bool mCaseSensitive
Definition: filename.h:87
bool operator<(const FileName &fn)
Definition: filename.cpp:28
string base(bool ext=true) const
Definition: filename.cpp:52