OpenEnroth 73e68f7
|
#include <MaskingFileSystem.h>
Public Member Functions | |
MaskingFileSystem (FileSystem *base=nullptr) | |
virtual | ~MaskingFileSystem () |
void | mask (std::string_view path) |
void | mask (FileSystemPathView path) |
bool | unmask (std::string_view path) |
bool | unmask (FileSystemPathView path) |
void | clearMasks () |
Public Member Functions inherited from ProxyFileSystem | |
ProxyFileSystem (FileSystem *base=nullptr) | |
FileSystem * | base () const |
void | setBase (FileSystem *base) |
Public Member Functions inherited from FileSystem | |
FileSystem ()=default | |
virtual | ~FileSystem ()=default |
bool | exists (std::string_view path) const |
bool | exists (FileSystemPathView path) const |
FileStat | stat (std::string_view path) const |
FileStat | stat (FileSystemPathView path) const |
std::vector< DirectoryEntry > | ls (std::string_view path) const |
std::vector< DirectoryEntry > | ls (FileSystemPathView path) const |
void | ls (std::string_view path, std::vector< DirectoryEntry > *entries) const |
void | ls (FileSystemPathView path, std::vector< DirectoryEntry > *entries) const |
Blob | read (std::string_view path) const |
Blob | read (FileSystemPathView path) const |
void | write (std::string_view path, const Blob &data) |
void | write (FileSystemPathView path, const Blob &data) |
std::unique_ptr< InputStream > | openForReading (std::string_view path) const |
std::unique_ptr< InputStream > | openForReading (FileSystemPathView path) const |
std::unique_ptr< OutputStream > | openForWriting (std::string_view path) |
std::unique_ptr< OutputStream > | openForWriting (FileSystemPathView path) |
void | rename (std::string_view srcPath, std::string_view dstPath) |
void | rename (FileSystemPathView srcPath, FileSystemPathView dstPath) |
bool | remove (std::string_view path) |
bool | remove (FileSystemPathView path) |
std::string | displayPath (std::string_view path) const |
std::string | displayPath (FileSystemPathView path) const |
Private Member Functions | |
bool | isMasked (FileSystemPathView path) const |
virtual bool | _exists (FileSystemPathView path) const override |
virtual FileStat | _stat (FileSystemPathView path) const override |
virtual void | _ls (FileSystemPathView path, std::vector< DirectoryEntry > *entries) const override |
virtual Blob | _read (FileSystemPathView path) const override |
virtual void | _write (FileSystemPathView path, const Blob &data) override |
virtual std::unique_ptr< InputStream > | _openForReading (FileSystemPathView path) const override |
virtual std::unique_ptr< OutputStream > | _openForWriting (FileSystemPathView path) override |
virtual void | _rename (FileSystemPathView srcPath, FileSystemPathView dstPath) override |
virtual bool | _remove (FileSystemPathView path) override |
virtual std::string | _displayPath (FileSystemPathView path) const override |
Private Attributes | |
FileSystemTrie< bool > | _masks |
Additional Inherited Members | |
Protected Types inherited from FileSystem | |
template<class T > | |
using | FileSystemTrieNode = detail::FileSystemTrieNode< T > |
template<class T > | |
using | FileSystemTrie = detail::FileSystemTrie< T > |
Protected Member Functions inherited from ProxyFileSystem | |
virtual bool | _exists (FileSystemPathView path) const override |
virtual FileStat | _stat (FileSystemPathView path) const override |
virtual void | _ls (FileSystemPathView path, std::vector< DirectoryEntry > *entries) const override |
virtual Blob | _read (FileSystemPathView path) const override |
virtual void | _write (FileSystemPathView path, const Blob &data) override |
virtual std::unique_ptr< InputStream > | _openForReading (FileSystemPathView path) const override |
virtual std::unique_ptr< OutputStream > | _openForWriting (FileSystemPathView path) override |
virtual void | _rename (FileSystemPathView srcPath, FileSystemPathView dstPath) override |
virtual bool | _remove (FileSystemPathView path) override |
virtual std::string | _displayPath (FileSystemPathView path) const override |
FileSystem * | nonNullBase () const |
virtual bool | _exists (FileSystemPathView path) const =0 |
virtual FileStat | _stat (FileSystemPathView path) const =0 |
virtual void | _ls (FileSystemPathView path, std::vector< DirectoryEntry > *entries) const =0 |
virtual Blob | _read (FileSystemPathView path) const =0 |
virtual void | _write (FileSystemPathView path, const Blob &data)=0 |
virtual std::unique_ptr< InputStream > | _openForReading (FileSystemPathView path) const =0 |
virtual std::unique_ptr< OutputStream > | _openForWriting (FileSystemPathView path)=0 |
virtual void | _rename (FileSystemPathView srcPath, FileSystemPathView dstPath) |
virtual bool | _remove (FileSystemPathView path)=0 |
virtual std::string | _displayPath (FileSystemPathView path) const =0 |
Proxy filesystem that supports masking out certain parts of the underlying filesystem.
|
explicit |
|
virtualdefault |
|
overrideprivatevirtual |
Reimplemented from ProxyFileSystem.
|
overrideprivatevirtual |
Reimplemented from ProxyFileSystem.
|
overrideprivatevirtual |
Reimplemented from ProxyFileSystem.
|
overrideprivatevirtual |
Reimplemented from ProxyFileSystem.
|
overrideprivatevirtual |
Reimplemented from ProxyFileSystem.
|
overrideprivatevirtual |
Reimplemented from ProxyFileSystem.
|
overrideprivatevirtual |
Reimplemented from ProxyFileSystem.
|
overrideprivatevirtual |
Reimplemented from ProxyFileSystem.
|
overrideprivatevirtual |
Reimplemented from ProxyFileSystem.
|
overrideprivatevirtual |
Reimplemented from ProxyFileSystem.
void MaskingFileSystem::clearMasks | ( | ) |
|
private |
void MaskingFileSystem::mask | ( | FileSystemPathView | path | ) |
void MaskingFileSystem::mask | ( | std::string_view | path | ) |
bool MaskingFileSystem::unmask | ( | FileSystemPathView | path | ) |
bool MaskingFileSystem::unmask | ( | std::string_view | path | ) |
|
private |