MAK Data Logger API Documentation for DIS
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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. More...
 
static void setTempDirectory (const DtString &directory)
 Set the temp file directory. More...
 
static bool fileExists (const DtString &filename)
 Check to see if a given file exists. More...
 
static void removeFile (const DtString &filename)
 Delete a file. More...
 
static void duplicateFile (const DtString &copyLocation, const DtString &oldLocation)
 Duplicate a file. More...
 
static DtString backupFileName (const DtString &filename)
 Get the name of the a backup file name given the input filename. More...
 
static void moveFile (const DtString &newLocation, const DtString &oldLocation)
 Destructively replace the old file with the new file. More...
 
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. More...
 
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. More...
 
static const DtString & backupExtension ()
 Get the backup extension. More...
 
static void setBackupExtension (const DtString &ext)
 Set the backup extension. By default it is ".bak". More...
 
static void setDefaultDir (DtFilename filename)
 Set the default file storage directory. More...
 
static const DtFilename & defaultDir ()
 Get the default file storage directory. More...
 
static DtString & 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 Return a reference to the constructed filename. More...
 
static DtString & absolutePath (const DtString &path, DtString &newAbsolutePath)
 Given a file path to an existing file, make it an absolute path in the provided result. More...
 

Static Protected Attributes

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

Private Member Functions

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

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 DtString& MAKLogger::DtLgrFileSystem::absolutePath ( const DtString &  path,
DtString &  newAbsolutePath 
)
static

Given a file path to an existing file, make it an absolute path in the provided result.

Result is an empty string if file does not exist. Return a reference to the absolute path

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 DtString& 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 Return a reference to the constructed filename.

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 Dec 18 15:35:09 EST 2025 from SVN revision 282494
Copyright © 2024 MAK Technologies. All Rights Reserved (www.mak.com)