SMTK
@SMTK_VERSION@
Simulation Modeling Tool Kit
|
A collection of methods to aid I/O. More...
#include <Helpers.h>
Static Public Member Functions | |
static bool | isDirectoryASubdirectory (const std::string &dirA, const std::string &dirB, std::string &bRelativeToA) |
Given 2 directories (which may not yet exist), determine as far as the filesystem will let us whether dirB is a subdirectory of dirA. More... | |
static bool | isSMTKFilename (const std::string &pathToFile, std::string &containingDir) |
Returns true if pathToFile is an SMTK file (ends in .smtk). More... | |
static std::string | uniqueFilename (const std::string &start, std::set< std::string > &preExisting, const std::string &defaultStem, const std::string &defaultExtension="", const std::string &base=".") |
Construct a unique filename given a starting point and a set of pre-existing filenames. More... | |
A collection of methods to aid I/O.
|
static |
Given 2 directories (which may not yet exist), determine as far as the filesystem will let us whether dirB is a subdirectory of dirA.
When returning true, bRelativeToA is set to the relative path of dirB.
|
static |
Returns true if pathToFile is an SMTK file (ends in .smtk).
When returning true, the directory contains the file is stored in containingDir.
|
static |
Construct a unique filename given a starting point and a set of pre-existing filenames.
The return value is inserted into preExisting just prior to return. If start is a directory rather than a file or a stem cannot be detected, then defaultStem will be used as the stem of the file name.
All names will be taken relative to the base directory.