clang 22.0.0git
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 tryGetRealPathName () const
off_t getSize () const
void setSize (off_t NewSize)
unsigned getUID () const
const llvm::sys::fs::UniqueID & getUniqueID () const
time_t getModificationTime () const
const DirectoryEntrygetDir () const
 Return the directory the file lives in.
bool isNamedPipe () const
 Check whether the file is a named pipe (and thus can't be opened by the native FileManager methods).
bool isDeviceFile () const
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 306 of file FileEntry.h.

Constructor & Destructor Documentation

◆ ~FileEntry()

FileEntry::~FileEntry ( )
default

Member Function Documentation

◆ closeFile()

void FileEntry::closeFile ( ) const

◆ getDir()

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

Return the directory the file lives in.

Definition at line 340 of file FileEntry.h.

◆ getModificationTime()

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

◆ getSize()

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

◆ getUID()

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

Definition at line 335 of file FileEntry.h.

Referenced by clang::FileEntryRef::getUID(), and clang::SourceManager::isMainFile().

◆ getUniqueID()

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

Definition at line 336 of file FileEntry.h.

Referenced by clang::FileEntryRef::getUniqueID().

◆ isDeviceFile()

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

Definition at line 345 of file FileEntry.h.

Referenced by clang::FileEntryRef::isDeviceFile().

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

Referenced by clang::FileManager::getBufferForFile(), and clang::FileEntryRef::isNamedPipe().

◆ setSize()

void clang::FileEntry::setSize ( off_t NewSize)
inline

Definition at line 334 of file FileEntry.h.

◆ tryGetRealPathName()

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

Definition at line 331 of file FileEntry.h.

Referenced by getFileName(), and clang::Preprocessor::LookupEmbedFile().

◆ FileEntryTestHelper

friend class FileEntryTestHelper
friend

Definition at line 308 of file FileEntry.h.

References FileEntryTestHelper.

Referenced by FileEntryTestHelper.

◆ FileManager

friend class FileManager
friend

Definition at line 307 of file FileEntry.h.

References FileManager.

Referenced by FileManager.


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