ΒΆconst char* clang_getFileContents(
CXTranslationUnit tu,
CXFile file,
size_t* size)
const char* clang_getFileContents(
CXTranslationUnit tu,
CXFile file,
size_t* size)
Description
Retrieve the buffer associated with the given file.
Declared at: clang/include/clang-c/Index.h:416
Parameters
- CXTranslationUnit tu
- the translation unit
- CXFile file
- the file for which to retrieve the buffer.
- size_t* size
- [out] if non-NULL, will be set to the size of the buffer.
Returns
a pointer to the buffer in memory that holds the contents of\p file, or a NULL pointer when the file is not loaded.