class FileCollectorFileSystem

Declaration

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

Description

The virtual file system interface.

Declared at: llvm/lib/Support/FileCollector.cpp:255

Inherits from: FileSystem

Member Variables

private IntrusiveRefCntPtr<vfs::FileSystem> FS
private std::shared_ptr<FileCollector> Collector

Method Overview

  • public FileCollectorFileSystem(IntrusiveRefCntPtr<vfs::FileSystem> FS, std::shared_ptr<FileCollector> Collector)
  • 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
  • public std::error_code isLocal(const llvm::Twine & Path, bool & Result)
  • public llvm::ErrorOr<std::unique_ptr<llvm::vfs::File>> openFileForRead(const llvm::Twine & Path)
  • public std::error_code setCurrentWorkingDirectory(const llvm::Twine & Path)
  • public llvm::ErrorOr<llvm::vfs::Status> status(const llvm::Twine & Path)

Inherited from FileSystem:

Methods

FileCollectorFileSystem(
    IntrusiveRefCntPtr<vfs::FileSystem> FS,
    std::shared_ptr<FileCollector> Collector)

Declared at: llvm/lib/Support/FileCollector.cpp:257

Parameters

IntrusiveRefCntPtr<vfs::FileSystem> FS
std::shared_ptr<FileCollector> Collector

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/lib/Support/FileCollector.cpp:276

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/lib/Support/FileCollector.cpp:296

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/lib/Support/FileCollector.cpp:281

Parameters

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

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

Description

Is the file mounted on a local filesystem?

Declared at: llvm/lib/Support/FileCollector.cpp:292

Parameters

const llvm::Twine& Path
bool& Result

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

Description

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

Declared at: llvm/lib/Support/FileCollector.cpp:269

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/lib/Support/FileCollector.cpp:300

Parameters

const llvm::Twine& Path

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

Description

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

Declared at: llvm/lib/Support/FileCollector.cpp:261

Parameters

const llvm::Twine& Path