LLVM 20.0.0git
|
A file system that allows overlaying one AbstractFileSystem
on top of another.
More...
#include "llvm/Support/VirtualFileSystem.h"
Public Types | |
using | iterator = FileSystemList::reverse_iterator |
using | const_iterator = FileSystemList::const_reverse_iterator |
using | reverse_iterator = FileSystemList::iterator |
using | const_reverse_iterator = FileSystemList::const_iterator |
using | range = iterator_range< iterator > |
using | const_range = iterator_range< const_iterator > |
Public Member Functions | |
OverlayFileSystem (IntrusiveRefCntPtr< FileSystem > Base) | |
void | pushOverlay (IntrusiveRefCntPtr< FileSystem > FS) |
Pushes a file system on top of the stack. | |
llvm::ErrorOr< Status > | status (const Twine &Path) override |
bool | exists (const Twine &Path) override |
llvm::ErrorOr< std::unique_ptr< File > > | openFileForRead (const Twine &Path) override |
directory_iterator | dir_begin (const Twine &Dir, std::error_code &EC) override |
llvm::ErrorOr< std::string > | getCurrentWorkingDirectory () const override |
std::error_code | setCurrentWorkingDirectory (const Twine &Path) override |
std::error_code | isLocal (const Twine &Path, bool &Result) override |
std::error_code | getRealPath (const Twine &Path, SmallVectorImpl< char > &Output) override |
iterator | overlays_begin () |
Get an iterator pointing to the most recently added file system. | |
const_iterator | overlays_begin () const |
iterator | overlays_end () |
Get an iterator pointing one-past the least recently added file system. | |
const_iterator | overlays_end () const |
reverse_iterator | overlays_rbegin () |
Get an iterator pointing to the least recently added file system. | |
const_reverse_iterator | overlays_rbegin () const |
reverse_iterator | overlays_rend () |
Get an iterator pointing one-past the most recently added file system. | |
const_reverse_iterator | overlays_rend () const |
range | overlays_range () |
const_range | overlays_range () const |
Public Member Functions inherited from llvm::RTTIExtends< OverlayFileSystem, FileSystem > | |
const void * | dynamicClassID () const override |
bool | isA () const |
Check whether this instance is a subclass of QueryT. | |
bool | isA (const void *const ClassID) const override |
Static Public Attributes | |
static const char | ID = 0 |
Protected Member Functions | |
void | printImpl (raw_ostream &OS, PrintType Type, unsigned IndentLevel) const override |
void | visitChildFileSystems (VisitCallbackTy Callback) override |
Additional Inherited Members | |
Static Public Member Functions inherited from llvm::RTTIExtends< OverlayFileSystem, FileSystem > | |
static const void * | classID () |
static bool | classof (const T *R) |
A file system that allows overlaying one AbstractFileSystem
on top of another.
Consists of a stack of >=1 FileSystem
objects, which are treated as being one merged file system. When there is a directory that exists in more than one file system, the OverlayFileSystem
contains a directory containing the union of their contents. The attributes (permissions, etc.) of the top-most (most recently added) directory are used. When there is a file that exists in more than one file system, the file in the top-most file system overrides the other(s).
Definition at line 391 of file VirtualFileSystem.h.
Definition at line 417 of file VirtualFileSystem.h.
Definition at line 421 of file VirtualFileSystem.h.
Definition at line 419 of file VirtualFileSystem.h.
Definition at line 416 of file VirtualFileSystem.h.
Definition at line 420 of file VirtualFileSystem.h.
Definition at line 418 of file VirtualFileSystem.h.
OverlayFileSystem::OverlayFileSystem | ( | IntrusiveRefCntPtr< FileSystem > | Base | ) |
Definition at line 442 of file VirtualFileSystem.cpp.
References llvm::SmallVectorTemplateBase< T, bool >::push_back().
|
override |
Definition at line 615 of file VirtualFileSystem.cpp.
References llvm::Twine::str().
Definition at line 463 of file VirtualFileSystem.cpp.
References I, overlays_begin(), and overlays_end().
|
override |
Definition at line 484 of file VirtualFileSystem.cpp.
References llvm::SmallVectorTemplateCommon< T, typename >::front().
Referenced by pushOverlay().
|
override |
Definition at line 504 of file VirtualFileSystem.cpp.
References llvm::no_such_file_or_directory.
Definition at line 497 of file VirtualFileSystem.cpp.
References llvm::no_such_file_or_directory.
|
override |
Definition at line 473 of file VirtualFileSystem.cpp.
References I, llvm::make_error_code(), llvm::no_such_file_or_directory, overlays_begin(), and overlays_end().
|
inline |
Get an iterator pointing to the most recently added file system.
Definition at line 424 of file VirtualFileSystem.h.
References llvm::SmallVectorTemplateCommon< T, typename >::rbegin().
Referenced by exists(), openFileForRead(), and status().
|
inline |
Definition at line 425 of file VirtualFileSystem.h.
References llvm::SmallVectorTemplateCommon< T, typename >::rbegin().
|
inline |
Get an iterator pointing one-past the least recently added file system.
Definition at line 428 of file VirtualFileSystem.h.
References llvm::SmallVectorTemplateCommon< T, typename >::rend().
Referenced by exists(), openFileForRead(), and status().
|
inline |
Definition at line 429 of file VirtualFileSystem.h.
References llvm::SmallVectorTemplateCommon< T, typename >::rend().
|
inline |
Definition at line 439 of file VirtualFileSystem.h.
References llvm::reverse().
Referenced by printImpl(), and visitChildFileSystems().
|
inline |
Definition at line 440 of file VirtualFileSystem.h.
References llvm::reverse().
|
inline |
Get an iterator pointing to the least recently added file system.
Definition at line 432 of file VirtualFileSystem.h.
References llvm::SmallVectorTemplateCommon< T, typename >::begin().
|
inline |
Definition at line 433 of file VirtualFileSystem.h.
References llvm::SmallVectorTemplateCommon< T, typename >::begin().
|
inline |
Get an iterator pointing one-past the most recently added file system.
Definition at line 436 of file VirtualFileSystem.h.
References llvm::SmallVectorTemplateCommon< T, typename >::end().
|
inline |
Definition at line 437 of file VirtualFileSystem.h.
References llvm::SmallVectorTemplateCommon< T, typename >::end().
|
overrideprotected |
Definition at line 519 of file VirtualFileSystem.cpp.
References OS, and overlays_range().
void OverlayFileSystem::pushOverlay | ( | IntrusiveRefCntPtr< FileSystem > | FS | ) |
Pushes a file system on top of the stack.
Definition at line 446 of file VirtualFileSystem.cpp.
References llvm::get(), getCurrentWorkingDirectory(), and llvm::SmallVectorTemplateBase< T, bool >::push_back().
Definition at line 490 of file VirtualFileSystem.cpp.
Definition at line 453 of file VirtualFileSystem.cpp.
References I, llvm::make_error_code(), llvm::no_such_file_or_directory, overlays_begin(), and overlays_end().
|
overrideprotected |
Definition at line 512 of file VirtualFileSystem.cpp.
References overlays_range().
Definition at line 399 of file VirtualFileSystem.h.