class ProxyFileSystem

Declaration

class ProxyFileSystem : public FileSystem { /* full declaration omitted */ };

Description

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.

Declared at: llvm/include/llvm/Support/VirtualFileSystem.h:369

Inherits from: FileSystem

Method Overview

  • public ProxyFileSystem(IntrusiveRefCntPtr<llvm::vfs::FileSystem> FS)
  • public llvm::vfs::directory_iterator dir_begin(const llvm::Twine & Dir, std::error_code & EC)
  • public llvm::ErrorOr<std::string> getCurrentWorkingDirectory() const
  • public std::error_code getRealPath(const llvm::Twine & Path, SmallVectorImpl<char> & Output) const
  • protected llvm::vfs::FileSystem & getUnderlyingFS()
  • public std::error_code isLocal(const llvm::Twine & Path, bool & Result)
  • public llvm::ErrorOr<std::unique_ptr<File>> openFileForRead(const llvm::Twine & Path)
  • public std::error_code setCurrentWorkingDirectory(const llvm::Twine & Path)
  • public llvm::ErrorOr<Status> status(const llvm::Twine & Path)

Inherited from FileSystem:

Methods

ProxyFileSystem(
    IntrusiveRefCntPtr<llvm::vfs::FileSystem> FS)

Declared at: llvm/include/llvm/Support/VirtualFileSystem.h:371

Parameters

IntrusiveRefCntPtr<llvm::vfs::FileSystem> FS

llvm::vfs::directory_iterator dir_begin(
    const llvm::Twine& Dir,
    std::error_code& EC)

Description

Get a directory_iterator for \p Dir.

Declared at: llvm/include/llvm/Support/VirtualFileSystem.h:381

Parameters

const llvm::Twine& Dir
std::error_code& EC

llvm::ErrorOr<std::string>
getCurrentWorkingDirectory() const

Description

Get the working directory of this file system.

Declared at: llvm/include/llvm/Support/VirtualFileSystem.h:384

std::error_code getRealPath(
    const llvm::Twine& Path,
    SmallVectorImpl<char>& Output) const

Description

Gets real path of \p 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.

Declared at: llvm/include/llvm/Support/VirtualFileSystem.h:390

Parameters

const llvm::Twine& Path
SmallVectorImpl<char>& Output

llvm::vfs::FileSystem& getUnderlyingFS()

Declared at: llvm/include/llvm/Support/VirtualFileSystem.h:399

std::error_code isLocal(const llvm::Twine& Path,
                        bool& Result)

Description

Is the file mounted on a local filesystem?

Declared at: llvm/include/llvm/Support/VirtualFileSystem.h:394

Parameters

const llvm::Twine& Path
bool& Result

llvm::ErrorOr<std::unique_ptr<File>>
openFileForRead(const llvm::Twine& Path)

Description

Get a \p File object for the file at \p Path, if one exists.

Declared at: llvm/include/llvm/Support/VirtualFileSystem.h:378

Parameters

const llvm::Twine& Path

std::error_code setCurrentWorkingDirectory(
    const llvm::Twine& Path)

Description

Set the working directory. This will affect all following operations on this file system and may propagate down for nested file systems.

Declared at: llvm/include/llvm/Support/VirtualFileSystem.h:387

Parameters

const llvm::Twine& Path

llvm::ErrorOr<Status> status(
    const llvm::Twine& Path)

Description

Get the status of the entry at \p Path, if one exists.

Declared at: llvm/include/llvm/Support/VirtualFileSystem.h:374

Parameters

const llvm::Twine& Path