#include <gmlpathstring.h>
Inheritance diagram for PathString:
Public Member Functions | |
Constructors | |
PathString (const string &rhs) | |
PathString (const string &rhs, size_type pos, size_type n) | |
PathString (const char *s, size_type n) | |
PathString (const char *s) | |
PathString (size_type n, char c) | |
PathString (const_iterator first, const_iterator last) | |
PathString (const string &path, const string &filename, const string &extension=string()) | |
Constructs an object from path+filename+extension. | |
Path handling | |
string | Path () const |
Returns extracted path from full path to the file. | |
string | Filename () const |
Returns full name of the file (with extension). | |
string | Basename () const |
Returns base name of the file (without extension). | |
string | Extension () const |
Returns extension of the file (dot is not included). | |
void | Split (string *path, string *filename, string *extension=NULL) const |
Splits path name into path, base filename and extension. | |
bool | MakeFullPath (const PathString &relative_to=PathString()) |
File or directory handling | |
bool | IsFile () const |
Check: 'this' string is the name of the real plain file. | |
bool | IsDir () const |
Check: 'this' string is the name of the directory. | |
bool | CurDir () |
Get current working directory to 'this' pathname. | |
bool | ChDir () const |
Change current working directory to 'this' pathname. | |
bool | MkDir () const |
Create directory with name specified by 'this' pathname. | |
bool | RmDir () const |
Remove directory with name specified by 'this' pathname. | |
bool | ExePath () |
Get full path to the current program. | |
bool | ListFileName (list< PathString > &filelist, PathString *mask) const |
Static Public Attributes | |
const char | PATH_SEPARATOR = '\\' |
char path separator for currents OS | |
const string | PATH_SEPARATOR_STR = string("\\") |
string path separator for current OS | |
Protected Member Functions | |
bool | CheckMask (const PathString &mask) const |
void | CorrectSeparators () |
|
Constructs an object from path+filename+extension. The path separator will be added if string path does not end by path separator. The dot will be added between filename and extension if extension does not begin by dot.
|
|
Returns extracted path from full path to the file.
|
|
Returns full name of the file (with extension).
|
|
Returns base name of the file (without extension).
|
|
Returns extension of the file (dot is not included).
|
|
Splits path name into path, base filename and extension.
|
|
Expand current path to full path relative to 'relative_to' argument.
|
|
Remove directory with name specified by 'this' pathname.
|
|
Non-obligatory parameter mask defines mask for the filtration. |