MAK Data Logger API Documentation for HLA
List of all members | Static Public Member Functions | Static Protected Attributes
MAKLogger::DtLgrFileSystem Class Reference

Various File system commands. More...

+ Collaboration diagram for MAKLogger::DtLgrFileSystem:

Static Public Member Functions

static DtString tempFileName ()
 Get an unique temporary filename in the current working directory.
static void setTempDirectory (const DtString &directory)
 Set the temp file directory.
static bool fileExists (const DtString &filename)
 Check to see if a given file exists.
static void removeFile (const DtString &filename)
 Delete a file.
static void duplicateFile (const DtString &copyLocation, const DtString &oldLocation)
 Duplicate a file.
static DtString backupFileName (const DtString &filename)
 Get the name of the a backup file name given the input filename.
static void moveFile (const DtString &newLocation, const DtString &oldLocation)
 Destructively replace the old file with the new file.
static void backupAndReplaceFile (const DtString &originalFile, const DtString &newFile)
 Backs up the old file and replaces it with the new file Operation is equivalent to: if(exists originalFile) rename originalFile to originalFile.bak rename newFile to originalFile.
static void backupAndDuplicateFile (const DtString &originalFile, const DtString &newFile)
 Backs up the old file and replaces it with a copy of the new file Operation is equivalent to: if(exists originalFile) rename originalFile to oldfile.bak copy newFile to originalFile.
static const DtStringbackupExtension ()
 Get the backup extension.
static void setBackupExtension (const DtString &ext)
 Set the backup extension. By default it is ".bak".
static void setDefaultDir (DtFilename filename)
 Set the default file storage directory.
static const DtFilename & defaultDir ()
 Get the default file storage directory.
static void constructFileName (const DtFilename &filename, const DtFilename &filePath, long id, DtFilename &constructedName)
 Construct a file name and path using given file name (should be just the base name), ID and path.

Static Protected Attributes

static DtString theBackupExtension
 String added to backup files.
static DtString theTempPath
static DtFilename theDefaultDir

Private Member Functions

 DtLgrFileSystem ()
 Not Implemented.
 DtLgrFileSystem (const DtLgrFileSystem &)
 Not Implemented.
DtLgrFileSystemoperator= (const DtLgrFileSystem &)
 Not Implemented.
 ~DtLgrFileSystem ()
 Not Implemented.

Detailed Description

Various File system commands.

Constructor & Destructor Documentation

MAKLogger::DtLgrFileSystem::DtLgrFileSystem ( )
private

Not Implemented.

MAKLogger::DtLgrFileSystem::DtLgrFileSystem ( const DtLgrFileSystem )
private

Not Implemented.

MAKLogger::DtLgrFileSystem::~DtLgrFileSystem ( )
private

Not Implemented.

Member Function Documentation

static void MAKLogger::DtLgrFileSystem::backupAndDuplicateFile ( const DtString originalFile,
const DtString newFile 
)
static

Backs up the old file and replaces it with a copy of the new file Operation is equivalent to: if(exists originalFile) rename originalFile to oldfile.bak copy newFile to originalFile.

static void MAKLogger::DtLgrFileSystem::backupAndReplaceFile ( const DtString originalFile,
const DtString newFile 
)
static

Backs up the old file and replaces it with the new file Operation is equivalent to: if(exists originalFile) rename originalFile to originalFile.bak rename newFile to originalFile.

static const DtString& MAKLogger::DtLgrFileSystem::backupExtension ( )
static

Get the backup extension.

static DtString MAKLogger::DtLgrFileSystem::backupFileName ( const DtString filename)
static

Get the name of the a backup file name given the input filename.

This does not make any claims of either files existence and is only used for determining the valid strings.

static void MAKLogger::DtLgrFileSystem::constructFileName ( const DtFilename &  filename,
const DtFilename &  filePath,
long  id,
DtFilename &  constructedName 
)
static

Construct a file name and path using given file name (should be just the base name), ID and path.

static const DtFilename& MAKLogger::DtLgrFileSystem::defaultDir ( )
static

Get the default file storage directory.

static void MAKLogger::DtLgrFileSystem::duplicateFile ( const DtString copyLocation,
const DtString oldLocation 
)
static

Duplicate a file.

The file at oldLocation is copied to a new file at the copyLocation.

static bool MAKLogger::DtLgrFileSystem::fileExists ( const DtString filename)
static

Check to see if a given file exists.

static void MAKLogger::DtLgrFileSystem::moveFile ( const DtString newLocation,
const DtString oldLocation 
)
static

Destructively replace the old file with the new file.

Operation is equivalent to: if(exists originalFile) delete originalFile rename newFile to originalFile.

DtLgrFileSystem& MAKLogger::DtLgrFileSystem::operator= ( const DtLgrFileSystem )
private

Not Implemented.

static void MAKLogger::DtLgrFileSystem::removeFile ( const DtString filename)
static

Delete a file.

The file is assume to exist and the user has the proper permissions.

static void MAKLogger::DtLgrFileSystem::setBackupExtension ( const DtString ext)
static

Set the backup extension. By default it is ".bak".

static void MAKLogger::DtLgrFileSystem::setDefaultDir ( DtFilename  filename)
static

Set the default file storage directory.

static void MAKLogger::DtLgrFileSystem::setTempDirectory ( const DtString directory)
static

Set the temp file directory.

static DtString MAKLogger::DtLgrFileSystem::tempFileName ( )
static

Get an unique temporary filename in the current working directory.

Member Data Documentation

DtString MAKLogger::DtLgrFileSystem::theBackupExtension
staticprotected

String added to backup files.

Default = ".bak" Typically assigned before file extension "test.lgr" -> "test.bak.lgr"

DtFilename MAKLogger::DtLgrFileSystem::theDefaultDir
staticprotected
DtString MAKLogger::DtLgrFileSystem::theTempPath
staticprotected

The documentation for this class was generated from the following file:

Document ID: Generated on Thu Apr 11 12:13:00 EDT 2013 from SVN revision 126011
Copyright © 2005-2012 VT MÄK. All Rights Reserved (www.mak.com)