20#ifndef LIBREPCB_CORE_FILEUTILS_H
21#define LIBREPCB_CORE_FILEUTILS_H
147 const FilePath& dir,
const QStringList& filters = QStringList(),
148 bool recursive =
false,
bool skipHiddenFiles =
false);
This class represents absolute, well-formatted paths to files or directories.
Definition: filepath.h:129
The FileUtils class provides some static methods to execute file operations.
Definition: fileutils.h:43
static void makePath(const FilePath &path)
Create a directory with all parent directories.
Definition: fileutils.cpp:156
static void copyDirRecursively(const FilePath &source, const FilePath &dest)
Copy a directory recursively.
Definition: fileutils.cpp:96
static void removeFile(const FilePath &file)
Remove a single file.
Definition: fileutils.cpp:140
static QList< FilePath > getFilesInDirectory(const FilePath &dir, const QStringList &filters=QStringList(), bool recursive=false, bool skipHiddenFiles=false)
Get all files in a given directory (optionally filtered by extension)
Definition: fileutils.cpp:164
FileUtils(const FileUtils &other)=delete
static void move(const FilePath &source, const FilePath &dest)
Move/rename a file or directory.
Definition: fileutils.cpp:120
static QByteArray readFile(const FilePath &filepath)
Read the content of a file into a QByteArray.
Definition: fileutils.cpp:39
static void copyFile(const FilePath &source, const FilePath &dest)
Copy a single file.
Definition: fileutils.cpp:78
static void removeDirRecursively(const FilePath &dir)
Remove a directory recursively.
Definition: fileutils.cpp:148
FileUtils & operator=(const FileUtils &rhs)=delete
static void writeFile(const FilePath &filepath, const QByteArray &content)
Write the content of a QByteArray into a file.
Definition: fileutils.cpp:55
static QList< FilePath > findDirectories(const FilePath &rootDir)
Get all directories within a given directory.
Definition: fileutils.cpp:200
Definition: occmodel.cpp:77