20#ifndef LIBREPCB_CORE_FILESYSTEM_H
21#define LIBREPCB_CORE_FILESYSTEM_H
50 FileSystem(QObject* parent =
nullptr) noexcept : QObject(parent) {}
55 virtual QStringList
getDirs(const QString& path = "") const noexcept = 0;
56 virtual QStringList
getFiles(const QString& path = "") const noexcept = 0;
57 virtual
bool fileExists(const QString& path) const noexcept = 0;
58 virtual QByteArray
read(const QString& path) const = 0;
60 virtual
void write(const QString& path, const QByteArray& content) = 0;
61 virtual
void renameFile(const QString& src, const QString& dst) = 0;
This class represents absolute, well-formatted paths to files or directories.
Definition filepath.h:127
Base class / interface for all file system implementations.
Definition filesystem.h:45
virtual QByteArray read(const QString &path) const =0
virtual FilePath getAbsPath(const QString &path="") const noexcept=0
virtual void removeDirRecursively(const QString &path="")=0
virtual bool fileExists(const QString &path) const noexcept=0
FileSystem(QObject *parent=nullptr) noexcept
Definition filesystem.h:50
virtual ~FileSystem() noexcept
Definition filesystem.h:51
virtual void write(const QString &path, const QByteArray &content)=0
virtual void removeFile(const QString &path)=0
virtual void renameFile(const QString &src, const QString &dst)=0
virtual QStringList getFiles(const QString &path="") const noexcept=0
virtual QStringList getDirs(const QString &path="") const noexcept=0
virtual QByteArray readIfExists(const QString &path) const =0
Definition occmodel.cpp:76