Instances of DtLgrFilename are DtStrings which convert filenames to the native format.
More...
Public Member Functions |
| | DtLgrFilename () |
| | default constructor
|
| | DtLgrFilename (const char *str) |
| | constructor
|
| virtual | ~DtLgrFilename () |
| | destructor
|
| | DtLgrFilename (const DtLgrFilename &orig) |
| | copy constructor
|
| DtLgrFilename & | operator= (const DtLgrFilename &orig) |
| | assignment operator
|
| DtLgrFilename & | operator= (const DtString &orig) |
| DtLgrFilename & | operator= (const char *orig) |
| virtual bool | absolute () const |
| | Returns true if the filename is an absolute filename, or a relative filename, respectively.
|
| virtual bool | relative () const |
| virtual void | append (DtLgrFilename const &filename) |
| | This filename is considered a path and the supplied filename is appended.
|
| virtual void | prefix (DtLgrFilename const &pathName) |
| | This filename is considered a relative path (or filename) and the supplied path is prefixed.
|
| virtual DtString | extension () const |
| | Returns the file extension, which are all the characters following the last '.
|
| virtual void | setExtension (const DtString &extension) |
| | Sets the extension for the filename, if the existing file has an extension it is removed, else this extension is appended.
|
| virtual void | stripFilename () |
| | Strip the filename from this path.
|
| virtual void | stripPath () |
| | Strip the path from this filename.
|
| virtual bool | isWritable () const |
| | Returns true if the filename is writable.
|
| virtual bool | isReadable () const |
| | Return true if the filename is readable.
|
| virtual unsigned long | fileLength () const |
| | Returns the size of the file in bytes.
|
| virtual bool | exists () const |
| | Returns true if the filename exists.
|
Detailed Description
Instances of DtLgrFilename are DtStrings which convert filenames to the native format.
Constructor & Destructor Documentation
| MAKLogger::DtLgrFilename::DtLgrFilename |
( |
| ) |
|
| MAKLogger::DtLgrFilename::DtLgrFilename |
( |
const char * |
str | ) |
|
| virtual MAKLogger::DtLgrFilename::~DtLgrFilename |
( |
| ) |
|
|
virtual |
| MAKLogger::DtLgrFilename::DtLgrFilename |
( |
const DtLgrFilename & |
orig | ) |
|
Member Function Documentation
| virtual bool MAKLogger::DtLgrFilename::absolute |
( |
| ) |
const |
|
virtual |
Returns true if the filename is an absolute filename, or a relative filename, respectively.
| virtual void MAKLogger::DtLgrFilename::append |
( |
DtLgrFilename const & |
filename | ) |
|
|
virtual |
This filename is considered a path and the supplied filename is appended.
The filename may be an absolute or relative path. If the filename is absolute, then it replaces this one. A separator is inserted between this path and the filename if necessary.
Constructs a new filename by combining the path with filename, which is an absolute or relative path.
If the filename is an absolute filename, then filename is returned. If the filename is a relative filename, then path is prefixed to it.
| virtual bool MAKLogger::DtLgrFilename::exists |
( |
| ) |
const |
|
virtual |
Returns true if the filename exists.
| virtual DtString MAKLogger::DtLgrFilename::extension |
( |
| ) |
const |
|
virtual |
Returns the file extension, which are all the characters following the last '.
' period. If there is no extension in the filename, an empty string is returned.
| virtual unsigned long MAKLogger::DtLgrFilename::fileLength |
( |
| ) |
const |
|
virtual |
Returns the size of the file in bytes.
If file does not exist results are undefined.
| virtual bool MAKLogger::DtLgrFilename::isReadable |
( |
| ) |
const |
|
virtual |
Return true if the filename is readable.
| virtual bool MAKLogger::DtLgrFilename::isWritable |
( |
| ) |
const |
|
virtual |
Returns true if the filename is writable.
| static const DtLgrFilename& MAKLogger::DtLgrFilename::nullFilename |
( |
| ) |
|
|
static |
| DtLgrFilename& MAKLogger::DtLgrFilename::operator= |
( |
const DtString & |
orig | ) |
|
| DtLgrFilename& MAKLogger::DtLgrFilename::operator= |
( |
const char * |
orig | ) |
|
| virtual void MAKLogger::DtLgrFilename::prefix |
( |
DtLgrFilename const & |
pathName | ) |
|
|
virtual |
This filename is considered a relative path (or filename) and the supplied path is prefixed.
The path name may be an absolute or relative path. If this filename is absolute it is left unchanged. A separator is inserted between the path and this filename if necessary.
| virtual bool MAKLogger::DtLgrFilename::relative |
( |
| ) |
const |
|
virtual |
| void MAKLogger::DtLgrFilename::replaceSlashes |
( |
| ) |
|
|
protected |
Replaces slashes.
On unix, this replaces backslashes with forward slashes. Vice versa on win32. Hail Mr Gates. This is not virtual, because we call this from the constructors and destructor.
| static char MAKLogger::DtLgrFilename::separator |
( |
| ) |
|
|
static |
Returns the separator used in representing directories.
| virtual void MAKLogger::DtLgrFilename::setExtension |
( |
const DtString & |
extension | ) |
|
|
virtual |
Sets the extension for the filename, if the existing file has an extension it is removed, else this extension is appended.
The extension string does NOT need a leading period.
| virtual void MAKLogger::DtLgrFilename::stripFilename |
( |
| ) |
|
|
virtual |
Strip the filename from this path.
Strip the filename from a path.
| virtual void MAKLogger::DtLgrFilename::stripPath |
( |
| ) |
|
|
virtual |
Strip the path from this filename.
Strip the path from a filename.
Member Data Documentation
| const char MAKLogger::DtLgrFilename::theSeparator |
|
staticprotected |
The documentation for this class was generated from the following file: