LibrePCB Developers Documentation
Loading...
Searching...
No Matches
FileSystem Class Referenceabstract

Base class / interface for all file system implementations. More...

#include <filesystem.h>

+ Inheritance diagram for FileSystem:
+ Collaboration diagram for FileSystem:

Public Member Functions

 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
 

Detailed Description

Base class / interface for all file system implementations.

See also
librepcb::TransactionalFileSystem
librepcb::TransactionalDirectory

Constructor & Destructor Documentation

◆ FileSystem()

FileSystem ( QObject *  parent = nullptr)
inlinenoexcept

◆ ~FileSystem()

virtual ~FileSystem ( )
inlinevirtualnoexcept

Member Function Documentation

◆ getAbsPath()

virtual FilePath getAbsPath ( const QString &  path = "") const
pure virtualnoexcept

◆ getDirs()

virtual QStringList getDirs ( const QString &  path = "") const
pure virtualnoexcept

◆ getFiles()

virtual QStringList getFiles ( const QString &  path = "") const
pure virtualnoexcept

◆ fileExists()

virtual bool fileExists ( const QString &  path) const
pure virtualnoexcept

◆ read()

virtual QByteArray read ( const QString &  path) const
pure virtual

◆ readIfExists()

virtual QByteArray readIfExists ( const QString &  path) const
pure virtual

◆ write()

virtual void write ( const QString &  path,
const QByteArray &  content 
)
pure virtual

◆ renameFile()

virtual void renameFile ( const QString &  src,
const QString &  dst 
)
pure virtual

◆ removeFile()

virtual void removeFile ( const QString &  path)
pure virtual

◆ removeDirRecursively()

virtual void removeDirRecursively ( const QString &  path = "")
pure virtual

The documentation for this class was generated from the following file: