clang 20.0.0git
Classes | Typedefs | Functions
File manipulation routines

Classes

struct  CXFileUniqueID
 Uniquely identifies a CXFile, that refers to the same underlying file, across an indexing session. More...
 

Typedefs

typedef void * CXFile
 A particular source file that is part of a translation unit.
 

Functions

CINDEX_LINKAGE CXString clang_getFileName (CXFile SFile)
 Retrieve the complete file and path name of the given file.
 
CINDEX_LINKAGE time_t clang_getFileTime (CXFile SFile)
 Retrieve the last modification time of the given file.
 
CINDEX_LINKAGE int clang_getFileUniqueID (CXFile file, CXFileUniqueID *outID)
 Retrieve the unique ID for the given file.
 
CINDEX_LINKAGE int clang_File_isEqual (CXFile file1, CXFile file2)
 Returns non-zero if the file1 and file2 point to the same file, or they are both NULL.
 
CINDEX_LINKAGE CXString clang_File_tryGetRealPathName (CXFile file)
 Returns the real path name of file.
 

Detailed Description

Typedef Documentation

◆ CXFile

typedef void* CXFile

A particular source file that is part of a translation unit.

Definition at line 34 of file CXFile.h.

Function Documentation

◆ clang_File_isEqual()

CINDEX_LINKAGE int clang_File_isEqual ( CXFile  file1,
CXFile  file2 
)

Returns non-zero if the file1 and file2 point to the same file, or they are both NULL.

◆ clang_File_tryGetRealPathName()

CINDEX_LINKAGE CXString clang_File_tryGetRealPathName ( CXFile  file)

Returns the real path name of file.

An empty string may be returned. Use clang_getFileName() in that case.

◆ clang_getFileName()

CINDEX_LINKAGE CXString clang_getFileName ( CXFile  SFile)

Retrieve the complete file and path name of the given file.

◆ clang_getFileTime()

CINDEX_LINKAGE time_t clang_getFileTime ( CXFile  SFile)

Retrieve the last modification time of the given file.

◆ clang_getFileUniqueID()

CINDEX_LINKAGE int clang_getFileUniqueID ( CXFile  file,
CXFileUniqueID outID 
)

Retrieve the unique ID for the given file.

Parameters
filethe file to get the ID for.
outIDstores the returned CXFileUniqueID.
Returns
If there was a failure getting the unique ID, returns non-zero, otherwise returns 0.