tildefriends/src/file.js.h

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

20 lines
612 B
C
Raw Normal View History

#pragma once
/**
** \defgroup file_js File Interface
** Exposes an operating system file I/O API to script.
** @{
*/
#include <uv.h>
typedef struct JSContext JSContext;
typedef struct _tf_task_t tf_task_t;
void tf_file_register(JSContext* context);
void tf_file_stat(tf_task_t* task, const char* path, void (*callback)(tf_task_t* task, const char* path, int result, const uv_stat_t* stat, void* user_data), void* user_data);
void tf_file_read(tf_task_t* task, const char* path, void (*callback)(tf_task_t* task, const char* path, int result, const void* data, void* user_data), void* user_data);
/** @} */