Thanks to visit codestin.com
Credit goes to llvm.org

LLVM 22.0.0git
llvm::vfs::Status Class Reference

The result of a status operation. More...

#include "llvm/Support/VirtualFileSystem.h"

Public Member Functions

 Status ()=default
LLVM_ABI Status (const llvm::sys::fs::file_status &Status)
LLVM_ABI Status (const Twine &Name, llvm::sys::fs::UniqueID UID, llvm::sys::TimePoint<> MTime, uint32_t User, uint32_t Group, uint64_t Size, llvm::sys::fs::file_type Type, llvm::sys::fs::perms Perms)
StringRef getName () const
 Returns the name that should be used for this file or directory.
Status interface from llvm::sys::fs
llvm::sys::fs::file_type getType () const
llvm::sys::fs::perms getPermissions () const
llvm::sys::TimePoint getLastModificationTime () const
llvm::sys::fs::UniqueID getUniqueID () const
uint32_t getUser () const
uint32_t getGroup () const
uint64_t getSize () const
Status queries

These are static queries in llvm::sys::fs.

LLVM_ABI bool equivalent (const Status &Other) const
LLVM_ABI bool isDirectory () const
LLVM_ABI bool isRegularFile () const
LLVM_ABI bool isOther () const
LLVM_ABI bool isSymlink () const
LLVM_ABI bool isStatusKnown () const
LLVM_ABI bool exists () const

Static Public Member Functions

static LLVM_ABI Status copyWithNewSize (const Status &In, uint64_t NewSize)
 Get a copy of a Status with a different size.
static LLVM_ABI Status copyWithNewName (const Status &In, const Twine &NewName)
 Get a copy of a Status with a different name.
static LLVM_ABI Status copyWithNewName (const llvm::sys::fs::file_status &In, const Twine &NewName)

Public Attributes

bool ExposesExternalVFSPath = false
 Whether this entity has an external path different from the virtual path, and the external path is exposed by leaking it through the abstraction.

Detailed Description

The result of a status operation.

Definition at line 49 of file VirtualFileSystem.h.

Constructor & Destructor Documentation

◆ Status() [1/3]

llvm::vfs::Status::Status ( )
default

◆ Status() [2/3]

Status::Status ( const llvm::sys::fs::file_status & Status)

◆ Status() [3/3]

Status::Status ( const Twine & Name,
llvm::sys::fs::UniqueID UID,
llvm::sys::TimePoint<> MTime,
uint32_t User,
uint32_t Group,
uint64_t Size,
llvm::sys::fs::file_type Type,
llvm::sys::fs::perms Perms )

Definition at line 68 of file VirtualFileSystem.cpp.

Member Function Documentation

◆ copyWithNewName() [1/2]

Status Status::copyWithNewName ( const llvm::sys::fs::file_status & In,
const Twine & NewName )
static

Definition at line 86 of file VirtualFileSystem.cpp.

References Status().

◆ copyWithNewName() [2/2]

Status Status::copyWithNewName ( const Status & In,
const Twine & NewName )
static

Get a copy of a Status with a different name.

Definition at line 80 of file VirtualFileSystem.cpp.

References Status().

Referenced by getRedirectedFileStatus(), llvm::vfs::detail::InMemoryDirectory::getStatus(), and llvm::vfs::detail::InMemoryFile::getStatus().

◆ copyWithNewSize()

Status Status::copyWithNewSize ( const Status & In,
uint64_t NewSize )
static

Get a copy of a Status with a different size.

Definition at line 74 of file VirtualFileSystem.cpp.

References Status().

◆ equivalent()

bool Status::equivalent ( const Status & Other) const

◆ exists()

bool Status::exists ( ) const

Definition at line 109 of file VirtualFileSystem.cpp.

References isStatusKnown().

Referenced by llvm::vfs::FileSystem::exists(), and isOther().

◆ getGroup()

uint32_t llvm::vfs::Status::getGroup ( ) const
inline

Definition at line 96 of file VirtualFileSystem.h.

Referenced by Status().

◆ getLastModificationTime()

llvm::sys::TimePoint llvm::vfs::Status::getLastModificationTime ( ) const
inline

Definition at line 93 of file VirtualFileSystem.h.

Referenced by Status().

◆ getName()

StringRef llvm::vfs::Status::getName ( ) const
inline

Returns the name that should be used for this file or directory.

Definition at line 87 of file VirtualFileSystem.h.

Referenced by llvm::vfs::File::getName().

◆ getPermissions()

llvm::sys::fs::perms llvm::vfs::Status::getPermissions ( ) const
inline

Definition at line 92 of file VirtualFileSystem.h.

◆ getSize()

uint64_t llvm::vfs::Status::getSize ( ) const
inline

Definition at line 97 of file VirtualFileSystem.h.

Referenced by Status().

◆ getType()

llvm::sys::fs::file_type llvm::vfs::Status::getType ( ) const
inline

◆ getUniqueID()

llvm::sys::fs::UniqueID llvm::vfs::Status::getUniqueID ( ) const
inline

Definition at line 94 of file VirtualFileSystem.h.

Referenced by equivalent(), and Status().

◆ getUser()

uint32_t llvm::vfs::Status::getUser ( ) const
inline

Definition at line 95 of file VirtualFileSystem.h.

Referenced by Status().

◆ isDirectory()

bool Status::isDirectory ( ) const

Definition at line 97 of file VirtualFileSystem.cpp.

Referenced by isOther().

◆ isOther()

bool Status::isOther ( ) const

Definition at line 101 of file VirtualFileSystem.cpp.

References exists(), isDirectory(), isRegularFile(), and isSymlink().

◆ isRegularFile()

bool Status::isRegularFile ( ) const

Definition at line 99 of file VirtualFileSystem.cpp.

Referenced by isOther().

◆ isStatusKnown()

bool Status::isStatusKnown ( ) const

Definition at line 107 of file VirtualFileSystem.cpp.

Referenced by equivalent(), and exists().

◆ isSymlink()

bool Status::isSymlink ( ) const

Definition at line 105 of file VirtualFileSystem.cpp.

Referenced by isOther().

Member Data Documentation

◆ ExposesExternalVFSPath

bool llvm::vfs::Status::ExposesExternalVFSPath = false

Whether this entity has an external path different from the virtual path, and the external path is exposed by leaking it through the abstraction.

For example, a RedirectingFileSystem will set this for paths where UseExternalName is true.

FIXME: Currently the external path is exposed by replacing the virtual path in this Status object. Instead, we should leave the path in the Status intact (matching the requested virtual path) - see FileManager::getFileRef for how we plan to fix this.

Definition at line 69 of file VirtualFileSystem.h.

Referenced by getRedirectedFileStatus().


The documentation for this class was generated from the following files: