The virtual file system interface.

Synopsis

Declared in <llvm/Support/VirtualFileSystem.h>

Base Classes

Name

Description

llvm::ThreadSafeRefCountedBase<FileSystem>

A thread‐safe version of RefCountedBase.

RTTIExtends<FileSystem, RTTIRoot>

Inheritance utility for extensible RTTI.

Type Aliases

Enums

Name

PrintType

Member Functions

Name

Description

~FileSystem [destructor] [virtual]

Destructor

Release

Atomically decrement the reference count; delete the object when it reaches zero.

Retain

Increment the reference count.

UseCount

Return the current reference count.

dir_begin [virtual]

Get a directory_iterator for Dir.

dump

equivalent

exists [virtual]

Check whether Path exists. By default this uses status(), but filesystems may provide a more efficient implementation if available.

getBufferForFile

This is a convenience method that opens a file, gets its content and then closes the file. The IsText parameter is used to distinguish whether the file should be opened as a binary or text file.

getCurrentWorkingDirectory [virtual]

Get the working directory of this file system.

getRealPath [virtual]

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.

isA

Check whether this instance is a subclass of QueryT.

isLocal [virtual]

Is the file mounted on a local filesystem?

makeAbsolute [virtual]

Make Path an absolute path.

openFileForRead [virtual]

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

openFileForReadBinary [virtual]

Get a File object for the binary file at Path, if one exists. Some non‐ascii based file systems perform encoding conversions when reading as a text file, and this function should be used if a file's bytes should be read as‐is. On most filesystems, this is the same behaviour as openFileForRead.

print

setCurrentWorkingDirectory [virtual]

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

status [virtual]

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

visit

visitChildFileSystems [virtual]

Static Member Functions

Name

Description

classID

Return the static class ID for ThisT.

classof

Return true if R is an instance of ThisT (for Casting.h).

Static Data Members

Name

ID

Using Declarations

Protected Member Functions

Name

Description

operator= [deleted]

Copy assignment is deleted; reference counts are not copied.

printImpl [virtual]

printIndent

Non-Member Functions

Name

Description

createPhysicalFileSystem

Create an vfs::FileSystem for the 'real' file system, as seen by the operating system. It has its own working directory, independent of (but initially equal to) that of the process. This may only be called outside the IO sandbox.

getRealFileSystem

Gets an vfs::FileSystem for the 'real' file system, as seen by the operating system. The working directory is linked to the process's working directory. (This is usually thread‐hostile). This may only be called outside the IO sandbox.

getVFSFromYAML

Gets a FileSystem for a virtual file system described in YAML format.

Created with MrDocs