Main Page Class Hierarchy Compound List File List Compound Members File Members
FileName Class Reference
#include <FileName.h>
Collaboration diagram for FileName:
List of all members.
Detailed Description
Definition at line 17 of file FileName.h.
Constructor & Destructor Documentation
Member Function Documentation
Void FileName::AddCompExt ()
|
Add compression extension to filename.
Definition at line 275 of file FileName.cc.
The current extension is added to the name, and
'ext' becomes the new file extension.
Definition at line 33 of file FileName.cc.
Void FileName::DecompressCleanup ()
|
Clean up after decompression.
Definition at line 312 of file FileName.cc.
Int FileName::DecompressSetup ()
|
Bool FileName::Exists () const
|
FILE * FileName::FOpen (StrConst permissions) const [inline]
|
Return filehandle to the file.
Definition at line 67 of file FileName.h.
Int FileName::FindFileExtension (StrConst extensions[], Bool allowCompressed = true)
|
Search for file with the given list of acceptable
extensions.
Checks for a file with one of the given set of extensions. The
filename should have been already set to:
- The base name, in which case is will check for existing files with
one of the extensions.
- The name of an actual file, in which case it will check that it
has the right extension.
If allowCompressed is true, it will also recognize (and remove) .gz,
.bz2 and .Z extensions, setting flags appropriately.
Returns:
kFileNotFound couldn't find a valid file.
kBadExtension the extension already set isn't allowable.
Definition at line 145 of file FileName.cc.
StrConst FileName::GetDir () const [inline]
|
Get the pathname of the parent directory of the file.
Definition at line 41 of file FileName.h.
StrConst FileName::GetExtension () const [inline]
|
Get the file's current extension.
Definition at line 38 of file FileName.h.
StrConst FileName::GetFile () const [inline]
|
Get the name of the file.
Definition at line 35 of file FileName.h.
String FileName::GetPath () const
|
Get the full pathname.
Definition at line 39 of file FileName.cc.
Long FileName::GetTimeStamp () const
|
Bool FileName::IsReadable () const
|
Bool FileName::IsWritable () const
|
FileName & FileName::MakeUnique ()
|
Make the filename unique.
If a file of the current name already exists, it is
renamed 'myname-1.ext'. If that exists, it is
renamed 'myname-2.ext', and so on until a file with
that name doesn't already exist
Definition at line 257 of file FileName.cc.
Void FileName::RemoveExtension ()
|
Strips the current extension, and replaces it with the previous
extension, if one exists.
Definition at line 18 of file FileName.cc.
FileName & FileName::SetDir (StrConst dir) [inline]
|
Set the file's parent directory.
Definition at line 51 of file FileName.h.
FileName & FileName::SetExtension (StrConst ext) [inline]
|
Set the file's extension.
Definition at line 48 of file FileName.h.
FileName & FileName::SetFile (StrConst file) [inline]
|
Set the file's name.
Definition at line 45 of file FileName.h.
FileName & FileName::SetPath (StrConst path)
|
Set by the full pathname.
Definition at line 55 of file FileName.cc.
FileName & FileName::SetRelPath (StrConst path)
|
Set by relative path.
If the path starts with '/', the effect is the same
as with SetPath, otherwise the path is appended to
the current directory path.
Definition at line 78 of file FileName.cc.
Member Data Documentation
String FileName::extension [protected]
|
String FileName::name [protected]
|
current file name.
Definition at line 93 of file FileName.h.
String FileName::path [protected]
|
full path to the parent directory.
Definition at line 92 of file FileName.h.
The documentation for this class was generated from the following files:
Generated at Sat Aug 5 00:16:33 2000 for Class Library by
1.1.0 written by Dimitri van Heesch,
© 1997-2000