15 #ifndef BORNAGAIN_GUI_COREGUI_MAINWINDOW_PROJECTUTILS_H
16 #define BORNAGAIN_GUI_COREGUI_MAINWINDOW_PROJECTUTILS_H
25 QString
projectName(
const QString& projectFileName);
28 QString
projectDir(
const QString& projectFileName);
34 QString
autosaveDir(
const QString& projectFileName);
40 bool exists(
const QString& fileName);
57 bool removeFiles(
const QString& dirname,
const QStringList& filenames);
60 QStringList
substract(
const QStringList& lhs,
const QStringList& rhs);
std::string filename(const std::string &path)
Returns path without directory part ("Foo/Bar/Doz.int.gz" -> "Doz.int.gz")
Defines convenience function for project manager and document.
QStringList substract(const QStringList &lhs, const QStringList &rhs)
Returns list of string from lhs, which are not in rhs.
QStringList nonXMLDataInDir(const QString &dirname)
Returns list of files on disk representing nonXML data.
bool exists(const QString &fileName)
Returns true if file exists.
bool removeRecursively(const QString &dirname)
Removes recursively directory with given name.
bool removeFiles(const QString &dirname, const QStringList &filenames)
QString lastModified(const QString &fileName)
Returns a string representing modification time of given file.
QString autosaveName(const QString &projectFileName)
Returns name of project for autoSave from given project file name.
bool removeFile(const QString &dirname, const QString &filename)
Remove file from given directory.
QString projectName(const QString &projectFileName)
Returns project name deduced from project file name.
bool hasAutosavedData(const QString &projectFileName)
Returns true if project with given projectFileName contains autosaved data.
QString projectDir(const QString &projectFileName)
Returns project directory deduced from project file name.
QString autosaveDir(const QString &projectFileName)
Returns name of autosave directory for project with given project file name.
QString userExportDir()
Returns directory which user is normally using to export files.
QString readTextFile(const QString &fileName)
Returns multi-lione string representing content of text file.
QString autosaveSubdir()
Returns fixed name for autosave sub-directory.