clang  3.9.0svn
Classes | Typedefs | Functions
File manipulation routines
libclang: C Interface to Clang
Collaboration diagram for 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 unsigned clang_isFileMultipleIncludeGuarded (CXTranslationUnit tu, CXFile file)
 Determine whether the given header is guarded against multiple inclusions, either with the conventional #ifndef/#define/#endif macro guards or with #pragma once.
CINDEX_LINKAGE CXFile clang_getFile (CXTranslationUnit tu, const char *file_name)
 Retrieve a file handle within the given translation unit.
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.

Typedef Documentation

typedef void* CXFile

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

Definition at line 286 of file Index.h.


Function Documentation

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 CXFile clang_getFile ( CXTranslationUnit  tu,
const char *  file_name 
)

Retrieve a file handle within the given translation unit.

Parameters:
tuthe translation unit
file_namethe name of the file.
Returns:
the file handle for the named file in the translation unit tu, or a NULL file handle if the file was not a part of this translation unit.
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.

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.
CINDEX_LINKAGE unsigned clang_isFileMultipleIncludeGuarded ( CXTranslationUnit  tu,
CXFile  file 
)

Determine whether the given header is guarded against multiple inclusions, either with the conventional #ifndef/#define/#endif macro guards or with #pragma once.