LibrePCB Developers Documentation
|
Helper class to access a subdirectory of TransactionalFileSystem. More...
#include <transactionaldirectory.h>
Public Member Functions | |
TransactionalDirectory (QObject *parent=nullptr) | |
TransactionalDirectory (std::shared_ptr< TransactionalFileSystem > fs, const QString &dir="", QObject *parent=nullptr) noexcept | |
TransactionalDirectory (TransactionalDirectory &other, const QString &subdir="", QObject *parent=nullptr) noexcept | |
virtual | ~TransactionalDirectory () noexcept |
std::shared_ptr< const TransactionalFileSystem > | getFileSystem () const noexcept |
std::shared_ptr< TransactionalFileSystem > | getFileSystem () noexcept |
const QString & | getPath () const noexcept |
bool | isWritable () const noexcept |
bool | isRestoredFromAutosave () const noexcept |
virtual FilePath | getAbsPath (const QString &path="") const noexcept override |
virtual QStringList | getDirs (const QString &path="") const noexcept override |
virtual QStringList | getFiles (const QString &path="") const noexcept override |
virtual bool | fileExists (const QString &path) const noexcept override |
virtual QByteArray | read (const QString &path) const override |
virtual QByteArray | readIfExists (const QString &path) const override |
virtual void | write (const QString &path, const QByteArray &content) override |
virtual void | renameFile (const QString &src, const QString &dst) override |
virtual void | removeFile (const QString &path) override |
virtual void | removeDirRecursively (const QString &path="") override |
void | copyTo (TransactionalDirectory &dest) const |
void | saveTo (TransactionalDirectory &dest) |
void | moveTo (TransactionalDirectory &dest) |
Public Member Functions inherited from FileSystem | |
FileSystem (QObject *parent=nullptr) noexcept | |
virtual | ~FileSystem () noexcept |
virtual FilePath | getAbsPath (const QString &path="") const noexcept=0 |
virtual QStringList | getDirs (const QString &path="") const noexcept=0 |
virtual QStringList | getFiles (const QString &path="") const noexcept=0 |
virtual bool | fileExists (const QString &path) const noexcept=0 |
virtual QByteArray | read (const QString &path) const =0 |
virtual QByteArray | readIfExists (const QString &path) const =0 |
virtual void | write (const QString &path, const QByteArray &content)=0 |
virtual void | renameFile (const QString &src, const QString &dst)=0 |
virtual void | removeFile (const QString &path)=0 |
virtual void | removeDirRecursively (const QString &path="")=0 |
Static Private Member Functions | |
static void | copyDirRecursively (TransactionalFileSystem &srcFs, const QString &srcDir, TransactionalFileSystem &dstFs, const QString &dstDir) |
Private Attributes | |
std::shared_ptr< TransactionalFileSystem > | mFileSystem |
QString | mPath |
Helper class to access a subdirectory of TransactionalFileSystem.
Wraps a subdirectory of a librepcb::TransactionalFileSystem instance to allow accessing it like it was the root directory of a file system. In addition, it allows to copy or move whole directories between different transactional file systems.
TransactionalDirectory | ( | QObject * | parent = nullptr | ) |
|
explicitnoexcept |
|
noexcept |
|
virtualnoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
noexcept |
|
noexcept |
|
overridevirtualnoexcept |
|
overridevirtualnoexcept |
|
overridevirtualnoexcept |
|
overridevirtualnoexcept |
|
overridevirtual |
|
overridevirtual |
|
overridevirtual |
|
overridevirtual |
Implements FileSystem.
|
overridevirtual |
|
overridevirtual |
Implements FileSystem.
void copyTo | ( | TransactionalDirectory & | dest | ) | const |
void saveTo | ( | TransactionalDirectory & | dest | ) |
void moveTo | ( | TransactionalDirectory & | dest | ) |
|
staticprivate |
|
private |
|
private |