26 #include <QSharedData> 32 template<
typename A,
typename B>
struct QPair;
131 QString
path()
const;
134 QString
name()
const;
232 QString
original(
bool includeAttributes)
const;
234 QString
expanded(
bool includeAttributes)
const;
238 QString *m_originalFileNameString;
242 QString *m_expandedFileNameString;
246 QSharedDataPointer<Data> m_d;
QString path() const
Returns the path of the file name.
File name manipulation and expansion.
Data()
Data constructor, creates a new Data object.
FileName newVersion() const
Updates the file name to be the latest version.
~Data()
Destroys the Data object.
FileName addExtension(const QString &extension) const
Adds a new extension to the file name.
QString name() const
Returns the name of the file excluding the path and the attributes in the file name.
QDate highestVersionDate() const
This looks through the directory of the file and checks for the highest version date of the file that...
bool isDateVersioned() const
Checks if the file name is versioned by date.
QString originalPath() const
Returns the path of the original file name.
QString original(bool includeAttributes) const
Returns the original file name, stored in m_originalFileNameString.
QString fileNameQDatePattern() const
This changes the files format.
QString expanded(bool includeAttributes) const
Returns the expanded file name, stored in m_expandedFileNameString.
QString expanded() const
Returns a QString of the full file name including the file path, excluding the attributes.
QString original() const
Returns the full file name including the file path.
long highestVersionNum() const
This looks through the directory of the file and checks for the highest version number of the file th...
QDir dir() const
Returns the path of the file's parent directory as a QDir object.
This is the reference-counted data for FileName.
FileName & operator=(const FileName &rhs)
Clears the current contents of the FileName object and reinitializes it with the argument.
void validateVersioningState() const
This verifies the class invariant when using versioning - that the FileName is in an acceptable state...
bool operator!=(const FileName &rhs)
Compares equality of two FileName objects.
QString baseName() const
Returns the name of the file without the path and without extensions.
QString toString() const
Returns a QString of the full file name including the file path, excluding the attributes with any Is...
FileName highestVersion() const
Searches the directory specified in the file name for the highest version of the file name...
~FileName()
Destroys the FileName object.
FileName setExtension(const QString &extension) const
Sets all current file extensions to a new extension in the file name.
FileName()
Constructs an empty FileName object.
Namespace for ISIS/Bullet specific routines.
bool operator==(const FileName &rhs)
Compares equality of two FileName objects.
QString extension() const
Returns the last extension of the file name.
bool isNumericallyVersioned() const
Checks if the file name is versioned numerically.
QString attributes() const
Returns a QString of the attributes in a filename, attributes are expected to be of type CubeAttribut...
QPair< QString, QString > splitNameAroundVersionNum() const
This returns a QPair of the text (before, after) a version number in a file.
FileName version(long versionNumber) const
Returns a FileName object of the same file name but versioned numerically by the number passed in as ...
bool fileExists() const
Returns true if the file exists; false otherwise.
static FileName createTempFile(FileName templateFileName="$TEMPORARY/temp")
Creates a temporary file and returns a FileName object created using the temporary file...
bool isVersioned() const
Checks to see if a file name is versioned by date or numerically.
void setOriginal(const QString &originalStr)
Sets the original file name, stored in m_originalFileNameString.
FileName removeExtension() const
Removes all extensions in the file name.