NorMIT-nav  2023.01.05-dev+develop.0da12
An IGT application
cxFileHelpers.h
Go to the documentation of this file.
1 /*=========================================================================
2 This file is part of CustusX, an Image Guided Therapy Application.
3 
4 Copyright (c) SINTEF Department of Medical Technology.
5 All rights reserved.
6 
7 CustusX is released under a BSD 3-Clause license.
8 
9 See Lisence.txt (https://github.com/SINTEFMedtek/CustusX/blob/master/License.txt) for details.
10 =========================================================================*/
11 #ifndef CXFILEHELPERS_H
12 #define CXFILEHELPERS_H
13 
14 #include "cxResourceExport.h"
15 
16 #include <QString>
17 #include <QDir>
18 
19 namespace cx
20 {
21 
36 cxResource_EXPORT bool removeNonemptyDirRecursively(const QString& dirName);
37 
38 //From http://stackoverflow.com/questions/2536524/copy-directory-using-qt
39 cxResource_EXPORT bool copyRecursively(QString sourceDir, QString destinationDir, bool overWriteDirectory);
40 
41 cxResource_EXPORT QFileInfoList getDirs(QString path);
42 cxResource_EXPORT QStringList getAbsolutePathToFiles(QString path, QStringList nameFilters, bool includeSubDirs = false);
43 cxResource_EXPORT QStringList getAbsolutePathToXmlFiles(QString path, bool includeSubDirs = false);
44 
47 cxResource_EXPORT void forceNewlineBeforeEof(QString path);
48 
53 } // namespace cx
54 
55 
56 #endif // CXFILEHELPERS_H
cx::removeNonemptyDirRecursively
bool removeNonemptyDirRecursively(const QString &dirName)
Definition: cxFileHelpers.cpp:70
cx
Namespace for all CustusX production code.
Definition: cx_dev_group_definitions.h:13
cx::getDirs
QFileInfoList getDirs(QString path)
Definition: cxFileHelpers.cpp:93
cx::copyRecursively
bool copyRecursively(QString sourceDir, QString destinationDir, bool overWriteDirectory)
Definition: cxFileHelpers.cpp:23
cx::getAbsolutePathToXmlFiles
QStringList getAbsolutePathToXmlFiles(QString path, bool includeSubDirs)
Definition: cxFileHelpers.cpp:118
cx::getAbsolutePathToFiles
QStringList getAbsolutePathToFiles(QString path, QStringList nameFilters, bool includeSubDirs)
Definition: cxFileHelpers.cpp:101
cx::forceNewlineBeforeEof
void forceNewlineBeforeEof(QString path)
Definition: cxFileHelpers.cpp:123