LLVM  10.0.0svn
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
llvm::vfs::Status Class Reference

The result of a status operation. More...

#include "llvm/Support/VirtualFileSystem.h"

Collaboration diagram for llvm::vfs::Status:
Collaboration graph
[legend]

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. More...
 
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 copyWithNewName (const Status &In, const Twine &NewName)
 Get a copy of a Status with a different name. More...
 
static Status copyWithNewName (const llvm::sys::fs::file_status &In, const Twine &NewName)
 

Public Attributes

bool IsVFSMapped = false
 

Detailed Description

The result of a status operation.

Definition at line 45 of file VirtualFileSystem.h.

Constructor & Destructor Documentation

◆ Status() [1/3]

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

Referenced by copyWithNewName(), and Status().

◆ Status() [2/3]

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

Definition at line 66 of file VirtualFileSystem.cpp.

References Status(), and llvm::Twine::str().

◆ Status() [3/3]

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 
)

Member Function Documentation

◆ copyWithNewName() [1/2]

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

Get a copy of a Status with a different name.

Definition at line 77 of file VirtualFileSystem.cpp.

References getGroup(), getLastModificationTime(), getPermissions(), getSize(), getType(), getUniqueID(), getUser(), and Status().

Referenced by getRedirectedFileStatus(), and pathHasTraversal().

◆ copyWithNewName() [2/2]

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

◆ equivalent()

bool Status::equivalent ( const Status Other) const

Definition at line 89 of file VirtualFileSystem.cpp.

References assert(), getUniqueID(), and isStatusKnown().

Referenced by getSize().

◆ exists()

bool Status::exists ( ) const

◆ getGroup()

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

Definition at line 81 of file VirtualFileSystem.h.

Referenced by copyWithNewName().

◆ getLastModificationTime()

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

Definition at line 78 of file VirtualFileSystem.h.

Referenced by copyWithNewName().

◆ getName()

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

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

Definition at line 72 of file VirtualFileSystem.h.

Referenced by llvm::vfs::File::getName(), pathHasTraversal(), llvm::vfs::detail::InMemoryFile::toString(), and llvm::vfs::detail::InMemoryDirectory::toString().

◆ getPermissions()

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

Definition at line 77 of file VirtualFileSystem.h.

Referenced by copyWithNewName().

◆ getSize()

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

◆ getType()

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

Definition at line 76 of file VirtualFileSystem.h.

Referenced by copyWithNewName().

◆ getUniqueID()

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

Definition at line 79 of file VirtualFileSystem.h.

Referenced by copyWithNewName(), and equivalent().

◆ getUser()

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

Definition at line 80 of file VirtualFileSystem.h.

Referenced by copyWithNewName().

◆ isDirectory()

bool Status::isDirectory ( ) const

Definition at line 94 of file VirtualFileSystem.cpp.

Referenced by getSize(), and isOther().

◆ isOther()

bool Status::isOther ( ) const

Definition at line 98 of file VirtualFileSystem.cpp.

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

Referenced by getSize().

◆ isRegularFile()

bool Status::isRegularFile ( ) const

Definition at line 96 of file VirtualFileSystem.cpp.

Referenced by getSize(), and isOther().

◆ isStatusKnown()

bool Status::isStatusKnown ( ) const

Definition at line 104 of file VirtualFileSystem.cpp.

Referenced by equivalent(), exists(), and getSize().

◆ isSymlink()

bool Status::isSymlink ( ) const

Definition at line 102 of file VirtualFileSystem.cpp.

Referenced by getSize(), and isOther().

Member Data Documentation

◆ IsVFSMapped

bool llvm::vfs::Status::IsVFSMapped = false

Definition at line 57 of file VirtualFileSystem.h.

Referenced by getRedirectedFileStatus().


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