31 lines
572 B
C
31 lines
572 B
C
#ifndef RT_FILE_TAB_H
|
|
#define RT_FILE_TAB_H
|
|
|
|
#include "runtime.h"
|
|
|
|
#include <stdint.h>
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
/* used to identify a file (XXH3 hash of the path) */
|
|
typedef uint64_t rt_file_id;
|
|
#define RT_INVALID_FILE_ID 0
|
|
|
|
RT_DLLEXPORT rt_file_id rtGetFileId(const char *path);
|
|
|
|
RT_DLLEXPORT rt_file_id rtGetFileIdFromSpan(rt_text_span path);
|
|
|
|
RT_DLLEXPORT rt_file_id rtAddFile(const char *path);
|
|
|
|
RT_DLLEXPORT rt_file_id rtAddFileFromSpan(rt_text_span path);
|
|
|
|
RT_DLLEXPORT const char *rtGetFilePath(rt_file_id fid);
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
|
|
#endif
|