clang  16.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 ()
 
StringRef getName () const
 
FileEntryRef getLastRef () const
 
StringRef tryGetRealPathName () 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 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
 
class FileEntryTestHelper
 

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 349 of file FileEntry.h.

Constructor & Destructor Documentation

◆ ~FileEntry()

FileEntry::~FileEntry ( )
default

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 390 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 386 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 394 of file FileEntry.h.

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

◆ tryGetRealPathName()

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

Definition at line 383 of file FileEntry.h.

Referenced by getFileName().

Friends And Related Function Documentation

◆ FileEntryTestHelper

friend class FileEntryTestHelper
friend

Definition at line 351 of file FileEntry.h.

◆ FileManager

friend class FileManager
friend

Definition at line 350 of file FileEntry.h.


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