18 #ifndef QGSFILEUTILS_H
19 #define QGSFILEUTILS_H
21 #include "qgis_core.h"
39 static QString representFileSize( qint64 bytes );
49 static QStringList extensionsFromFilter(
const QString &filter );
57 static QString wildcardsFromFilter(
const QString &filter );
67 static bool fileMatchesFilter(
const QString &fileName,
const QString &filter );
80 static QString ensureFileNameHasExtension(
const QString &fileName,
const QStringList &extensions );
93 static QString addExtensionFromFilter(
const QString &fileName,
const QString &filter );
101 static QString stringToSafeFilename(
const QString &
string );
109 static QString findClosestExistingPath(
const QString &path );
121 static QStringList findFile(
const QString &file,
const QString &basepath = QString(),
int maxClimbs = 4,
int searchCeiling = 4,
const QString ¤tDir = QString() );
138 static bool pathIsSlowDevice(
const QString &path );
156 static QSet< QString > sidecarFilesForPath(
const QString &path );
192 static int openedFileLimit()
SIP_SKIP;
203 static int openedFileCount()
SIP_SKIP;
216 static bool isCloseToLimitOfOpenedFiles(
int filesToBeOpened = 1 )
SIP_SKIP;
@ IncludeMetadataFile
Indicates that any associated .qmd metadata file should be included with the operation.
@ IncludeStyleFile
Indicates that any associated .qml styling file should be included with the operation.
Class for file utilities.
Custom exception class which is raised when an operation is not supported.