clang 19.0.0git
CXFile.h
Go to the documentation of this file.
1/*===-- clang-c/CXFile.h - C Index File ---------------------------*- C -*-===*\
2|* *|
3|* Part of the LLVM Project, under the Apache License v2.0 with LLVM *|
4|* Exceptions. *|
5|* See https://llvm.org/LICENSE.txt for license information. *|
6|* SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception *|
7|* *|
8|*===----------------------------------------------------------------------===*|
9|* *|
10|* This header provides the interface to C Index files. *|
11|* *|
12\*===----------------------------------------------------------------------===*/
13
14#ifndef LLVM_CLANG_C_CXFILE_H
15#define LLVM_CLANG_C_CXFILE_H
16
17#include <time.h>
18
19#include "clang-c/CXString.h"
20#include "clang-c/ExternC.h"
21#include "clang-c/Platform.h"
22
24
25/**
26 * \defgroup CINDEX_FILES File manipulation routines
27 *
28 * @{
29 */
30
31/**
32 * A particular source file that is part of a translation unit.
33 */
34typedef void *CXFile;
35
36/**
37 * Retrieve the complete file and path name of the given file.
38 */
40
41/**
42 * Retrieve the last modification time of the given file.
43 */
45
46/**
47 * Uniquely identifies a CXFile, that refers to the same underlying file,
48 * across an indexing session.
49 */
50typedef struct {
51 unsigned long long data[3];
53
54/**
55 * Retrieve the unique ID for the given \c file.
56 *
57 * \param file the file to get the ID for.
58 * \param outID stores the returned CXFileUniqueID.
59 * \returns If there was a failure getting the unique ID, returns non-zero,
60 * otherwise returns 0.
61 */
63
64/**
65 * Returns non-zero if the \c file1 and \c file2 point to the same file,
66 * or they are both NULL.
67 */
69
70/**
71 * Returns the real path name of \c file.
72 *
73 * An empty string may be returned. Use \c clang_getFileName() in that case.
74 */
76
77/**
78 * @}
79 */
80
82
83#endif
#define LLVM_CLANG_C_EXTERN_C_END
Definition: ExternC.h:36
#define LLVM_CLANG_C_EXTERN_C_BEGIN
Definition: ExternC.h:35
#define CINDEX_LINKAGE
Definition: Platform.h:38
CINDEX_LINKAGE CXString clang_File_tryGetRealPathName(CXFile file)
Returns the real path name of file.
CINDEX_LINKAGE CXString clang_getFileName(CXFile SFile)
Retrieve the complete file and path name of 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 time_t clang_getFileTime(CXFile SFile)
Retrieve the last modification time of the given file.
void * CXFile
A particular source file that is part of a translation unit.
Definition: CXFile.h:34
CINDEX_LINKAGE int clang_getFileUniqueID(CXFile file, CXFileUniqueID *outID)
Retrieve the unique ID for the given file.
Uniquely identifies a CXFile, that refers to the same underlying file, across an indexing session.
Definition: CXFile.h:50
A character string.
Definition: CXString.h:37