LLVM 20.0.0git
|
The result of a status
operation.
More...
#include "llvm/Support/VirtualFileSystem.h"
Public Member Functions | |
Status ()=default | |
Status (const llvm::sys::fs::file_status &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) | |
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. | |
bool | equivalent (const Status &Other) const |
bool | isDirectory () const |
bool | isRegularFile () const |
bool | isOther () const |
bool | isSymlink () const |
bool | isStatusKnown () const |
bool | exists () const |
Static Public Member Functions | |
static Status | copyWithNewSize (const Status &In, uint64_t NewSize) |
Get a copy of a Status with a different size. | |
static Status | copyWithNewName (const Status &In, const Twine &NewName) |
Get a copy of a Status with a different name. | |
static 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. | |
The result of a status
operation.
Definition at line 48 of file VirtualFileSystem.h.
|
default |
Referenced by copyWithNewName(), and copyWithNewSize().
Status::Status | ( | const llvm::sys::fs::file_status & | Status | ) |
Definition at line 64 of file VirtualFileSystem.cpp.
llvm::vfs::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 | ||
) |
|
static |
Definition at line 87 of file VirtualFileSystem.cpp.
References Status().
Get a copy of a Status with a different name.
Definition at line 81 of file VirtualFileSystem.cpp.
References Status().
Referenced by getRedirectedFileStatus().
Get a copy of a Status with a different size.
Definition at line 75 of file VirtualFileSystem.cpp.
References Status().
Definition at line 93 of file VirtualFileSystem.cpp.
References assert(), getUniqueID(), isStatusKnown(), and llvm::Other.
Referenced by llvm::cl::ExpansionContext::expandResponseFiles().
bool Status::exists | ( | ) | const |
Definition at line 110 of file VirtualFileSystem.cpp.
References isStatusKnown().
Referenced by llvm::vfs::FileSystem::exists(), and isOther().
|
inline |
Definition at line 94 of file VirtualFileSystem.h.
|
inline |
Definition at line 91 of file VirtualFileSystem.h.
|
inline |
Returns the name that should be used for this file or directory.
Definition at line 85 of file VirtualFileSystem.h.
Referenced by llvm::vfs::File::getName(), llvm::vfs::detail::InMemoryFile::toString(), and llvm::vfs::detail::InMemoryDirectory::toString().
|
inline |
Definition at line 90 of file VirtualFileSystem.h.
|
inline |
Definition at line 95 of file VirtualFileSystem.h.
|
inline |
Definition at line 89 of file VirtualFileSystem.h.
Referenced by llvm::vfs::InMemoryFileSystem::addFile(), and llvm::vfs::InMemoryFileSystem::addFileNoOwn().
|
inline |
Definition at line 92 of file VirtualFileSystem.h.
Referenced by equivalent(), and llvm::vfs::detail::InMemoryDirectory::getUniqueID().
|
inline |
Definition at line 93 of file VirtualFileSystem.h.
bool Status::isDirectory | ( | ) | const |
Definition at line 98 of file VirtualFileSystem.cpp.
Referenced by isOther().
bool Status::isOther | ( | ) | const |
Definition at line 102 of file VirtualFileSystem.cpp.
References exists(), isDirectory(), isRegularFile(), and isSymlink().
bool Status::isRegularFile | ( | ) | const |
Definition at line 100 of file VirtualFileSystem.cpp.
Referenced by isOther().
bool Status::isStatusKnown | ( | ) | const |
Definition at line 108 of file VirtualFileSystem.cpp.
Referenced by equivalent(), and exists().
bool Status::isSymlink | ( | ) | const |
Definition at line 106 of file VirtualFileSystem.cpp.
Referenced by isOther().
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 68 of file VirtualFileSystem.h.
Referenced by getRedirectedFileStatus().