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