FilenameCl
is used to maintain filenames with all of its (operating system specific) constituents: drive, path, base name and extension.
???
Public Member Functions | |
Constructors | |
Filename (void) | |
create an empty filename | |
Filename (const char *filename) | |
create a filename based on a filename given as a C string | |
Filename (const char *cpszPath, const char *cpszFilename, const char *cpszExtension=0) | |
create a filename based on a path, a filename and an optional extension, all given as C strings | |
Filename (const Filename &filename) | |
copy constructor | |
~Filename (void) | |
destructor | |
Assignment operations | |
Filename & | operator= (const Filename &filename) |
assign new complete filename | |
Properties | |
bool | isExistent (void) const |
determine whether a file exists for filename on file system | |
bool | isAbsolute (void) const |
determine whether path has an absolute path specification | |
unsigned long | getFileSize (void) const |
return the size of this file in bytes. | |
Parts | |
const char * | getAsCString (void) const |
return full filename as a C string pointer | |
operator const char * (void) const | |
const char * | getName (void) const |
return the name part of this filename without the path but with the extension. | |
const char * | getExtension (void) const |
return the extension only, starting with the dot (e.g. | |
size_t | getLength (void) const |
return the length of the complete filename | |
void | setNew (const char *cpszPath, const char *cpszName=0, const char *cpszExtension=0) |
assign a new entry from a path, optional filename and optional extension. | |
void | setNewName (const char *cpszName) |
assign a new filename - keep current path. | |
void | setNewExtension (const char *cpszExtension) |
assign a new extension - keep current path and filename. | |
void | normalizeAbsolute (void) |
convert to an absolute name in native format with appropriate directory separators. | |
void | normalize (void) |
convert to a name in native format with appropriate directory separators. | |
void | extractPath (char *pszPath) const |
copy path value to buffer pointed to by pszPath . | |
void | extractBaseName (char *pszBaseName) const |
copy base name (without path or extension) to buffer pointed to by pszBaseName . | |
bool | matchesBase (const Filename &crclFilename) const |
return TRUE if base names match (basic name part witout extension) | |
bool | determinePath (const char *searchPaths) |
search for file in a list of search paths and return TRUE if found |
|
create an empty filename
|
|
create a filename based on a filename given as a C string
|
|
create a filename based on a path, a filename and an optional extension, all given as C strings
|
|
copy constructor
|
|
destructor
|
|
assign new complete filename
|
|
determine whether a file exists for filename on file system
|
|
determine whether path has an absolute path specification
|
|
return the size of this file in bytes.
|
|
return full filename as a C string pointer
|
|
|
|
return the name part of this filename without the path but with the extension.
|
|
return the extension only, starting with the dot (e.g. ".so")
|
|
return the length of the complete filename
|
|
assign a new entry from a path, optional filename and optional extension.
|
|
assign a new filename - keep current path. filename may include extension or not |
|
assign a new extension - keep current path and filename. Specified extension must include the extension dot (".") |
|
convert to an absolute name in native format with appropriate directory separators.
|
|
convert to a name in native format with appropriate directory separators.
|
|
copy path value to buffer pointed to by
If a path does not exist for this object, |
|
copy base name (without path or extension) to buffer pointed to by
|
|
return TRUE if base names match (basic name part witout extension)
|
|
search for file in a list of search paths and return TRUE if found
|