clang  14.0.0git
Public Member Functions | Friends | List of all members
clang::FileEntry Class Reference

Cached information about one file (either on disk or in the virtual file system). More...

#include "clang/Basic/FileEntry.h"

Public Member Functions

 FileEntry ()
 
 ~FileEntry ()
 
 FileEntry (const FileEntry &)=delete
 
FileEntryoperator= (const FileEntry &)=delete
 
StringRef getName () const
 
FileEntryRef getLastRef () const
 
StringRef tryGetRealPathName () const
 
bool isValid () const
 
off_t getSize () const
 
unsigned getUID () const
 
const llvm::sys::fs::UniqueID & getUniqueID () const
 
time_t getModificationTime () const
 
const DirectoryEntrygetDir () const
 Return the directory the file lives in. More...
 
bool operator< (const FileEntry &RHS) const
 
bool isNamedPipe () const
 Check whether the file is a named pipe (and thus can't be opened by the native FileManager methods). More...
 
void closeFile () const
 

Friends

class FileManager
 

Detailed Description

Cached information about one file (either on disk or in the virtual file system).

If the 'File' member is valid, then this FileEntry has an open file descriptor for the file.

Definition at line 331 of file FileEntry.h.

Constructor & Destructor Documentation

◆ FileEntry() [1/2]

FileEntry::FileEntry ( )

Definition at line 20 of file FileEntry.cpp.

◆ ~FileEntry()

FileEntry::~FileEntry ( )
default

◆ FileEntry() [2/2]

clang::FileEntry::FileEntry ( const FileEntry )
delete

Member Function Documentation

◆ closeFile()

void FileEntry::closeFile ( ) const

Definition at line 24 of file FileEntry.cpp.

Referenced by clang::FileManager::getBufferForFile().

◆ getDir()

const DirectoryEntry* clang::FileEntry::getDir ( ) const
inline

Return the directory the file lives in.

Definition at line 375 of file FileEntry.h.

Referenced by clang::ModuleMap::isHeaderUnavailableInModule(), clang::Preprocessor::LookupFile(), and clang::ModuleMap::setUmbrellaHeader().

◆ getLastRef()

FileEntryRef clang::FileEntry::getLastRef ( ) const
inline

◆ getModificationTime()

time_t clang::FileEntry::getModificationTime ( ) const
inline

◆ getName()

StringRef clang::FileEntry::getName ( ) const
inline

◆ getSize()

off_t clang::FileEntry::getSize ( ) const
inline

◆ getUID()

unsigned clang::FileEntry::getUID ( ) const
inline

◆ getUniqueID()

const llvm::sys::fs::UniqueID& clang::FileEntry::getUniqueID ( ) const
inline

Definition at line 371 of file FileEntry.h.

◆ isNamedPipe()

bool clang::FileEntry::isNamedPipe ( ) const
inline

Check whether the file is a named pipe (and thus can't be opened by the native FileManager methods).

Definition at line 381 of file FileEntry.h.

Referenced by clang::SourceManager::createFileID(), clang::FileManager::getBufferForFile(), and clang::SrcMgr::ContentCache::getBufferOrNone().

◆ isValid()

bool clang::FileEntry::isValid ( ) const
inline

◆ operator<()

bool clang::FileEntry::operator< ( const FileEntry RHS) const
inline

Definition at line 377 of file FileEntry.h.

◆ operator=()

FileEntry& clang::FileEntry::operator= ( const FileEntry )
delete

◆ tryGetRealPathName()

StringRef clang::FileEntry::tryGetRealPathName ( ) const
inline

Definition at line 367 of file FileEntry.h.

Referenced by getFileName().

Friends And Related Function Documentation

◆ FileManager

friend class FileManager
friend

Definition at line 332 of file FileEntry.h.


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