PUMA Library Reference Manual
|
#include <Puma/FilenameInfo.h>
Information about a filename supporting Puma::SmartPtr.
This object stores the name of the file, its path portion, and the root portion if the filename is absolute.
Public Member Functions | |
FilenameInfo () | |
Constructor. | |
~FilenameInfo () | |
Destructor. | |
void | name (const char *filename) |
Set a new filename. | |
const char * | name () const |
Get the filename. | |
const char * | path () |
Get the path portion of the filename. | |
const char * | root () |
Get the root of an absolute filename, i.e. | |
bool | is_absolute () const |
Check whether the filename is absolute, i.e. | |
bool | operator== (const FilenameInfo &filename) const |
Check if this filename equals the given. | |
Additional Inherited Members | |
Protected Member Functions inherited from Puma::SmartPtr< T >::RefCnt | |
RefCnt () | |
Constructor. | |
|
inline |
Constructor.
Puma::FilenameInfo::~FilenameInfo | ( | ) |
Destructor.
Frees the allocated strings.
bool Puma::FilenameInfo::is_absolute | ( | ) | const |
Check whether the filename is absolute, i.e.
starts at the root of the file system.
|
inline |
Get the filename.
void Puma::FilenameInfo::name | ( | const char * | filename | ) |
Set a new filename.
filename | The new filename. |
|
inline |
Check if this filename equals the given.
filename | The other filename. |
const char * Puma::FilenameInfo::path | ( | ) |
Get the path portion of the filename.
const char * Puma::FilenameInfo::root | ( | ) |
Get the root of an absolute filename, i.e.
everything up to the first path delimiter. This is for instance the drive portion of the filename on Windows (c:). On Unix systems this is simply a slash (/).