LLVM
8.0.1
|
By default, this delegates all calls to the underlying file system. More...
#include "llvm/Support/VirtualFileSystem.h"
Public Member Functions | |
ProxyFileSystem (IntrusiveRefCntPtr< FileSystem > FS) | |
llvm::ErrorOr< Status > | status (const Twine &Path) override |
Get the status of the entry at Path , if one exists. More... | |
llvm::ErrorOr< std::unique_ptr< File > > | openFileForRead (const Twine &Path) override |
Get a File object for the file at Path , if one exists. More... | |
directory_iterator | dir_begin (const Twine &Dir, std::error_code &EC) override |
Get a directory_iterator for Dir . More... | |
llvm::ErrorOr< std::string > | getCurrentWorkingDirectory () const override |
Get the working directory of this file system. More... | |
std::error_code | setCurrentWorkingDirectory (const Twine &Path) override |
Set the working directory. More... | |
std::error_code | getRealPath (const Twine &Path, SmallVectorImpl< char > &Output) const override |
Gets real path of Path e.g. More... | |
std::error_code | isLocal (const Twine &Path, bool &Result) override |
Is the file mounted on a local filesystem? More... | |
Public Member Functions inherited from llvm::vfs::FileSystem | |
virtual | ~FileSystem () |
llvm::ErrorOr< std::unique_ptr< llvm::MemoryBuffer > > | getBufferForFile (const Twine &Name, int64_t FileSize=-1, bool RequiresNullTerminator=true, bool IsVolatile=false) |
This is a convenience method that opens a file, gets its content and then closes the file. More... | |
bool | exists (const Twine &Path) |
Check whether a file exists. Provided for convenience. More... | |
std::error_code | makeAbsolute (SmallVectorImpl< char > &Path) const |
Make Path an absolute path. More... | |
Public Member Functions inherited from llvm::ThreadSafeRefCountedBase< FileSystem > | |
void | Retain () const |
void | Release () const |
Protected Member Functions | |
FileSystem & | getUnderlyingFS () |
Protected Member Functions inherited from llvm::ThreadSafeRefCountedBase< FileSystem > | |
ThreadSafeRefCountedBase () | |
By default, this delegates all calls to the underlying file system.
This is useful when derived file systems want to override some calls and still proxy other calls.
Definition at line 353 of file VirtualFileSystem.h.
|
inlineexplicit |
Definition at line 355 of file VirtualFileSystem.h.
|
inlineoverridevirtual |
Get a directory_iterator for Dir
.
Implements llvm::vfs::FileSystem.
Definition at line 365 of file VirtualFileSystem.h.
|
inlineoverridevirtual |
Get the working directory of this file system.
Implements llvm::vfs::FileSystem.
Definition at line 368 of file VirtualFileSystem.h.
|
inlineoverridevirtual |
Gets real path of Path
e.g.
collapse all . and .. patterns, resolve symlinks. For real file system, this uses llvm::sys::fs::real_path
. This returns errc::operation_not_permitted if not implemented by subclass.
Reimplemented from llvm::vfs::FileSystem.
Definition at line 374 of file VirtualFileSystem.h.
|
inlineprotected |
Definition at line 383 of file VirtualFileSystem.h.
|
inlineoverridevirtual |
Is the file mounted on a local filesystem?
Reimplemented from llvm::vfs::FileSystem.
Definition at line 378 of file VirtualFileSystem.h.
|
inlineoverridevirtual |
Get a File
object for the file at Path
, if one exists.
Implements llvm::vfs::FileSystem.
Definition at line 362 of file VirtualFileSystem.h.
|
inlineoverridevirtual |
Set the working directory.
This will affect all following operations on this file system and may propagate down for nested file systems.
Implements llvm::vfs::FileSystem.
Definition at line 371 of file VirtualFileSystem.h.
|
inlineoverridevirtual |
Get the status of the entry at Path
, if one exists.
Implements llvm::vfs::FileSystem.
Definition at line 358 of file VirtualFileSystem.h.