|
| 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) |
| |
Exposes an operating system file I/O API to script.
◆ tf_task_t
◆ tf_file_read()
| void tf_file_read |
( |
tf_task_t * |
task, |
|
|
const char * |
path, |
|
|
void(*)(tf_task_t *task, const char *path, int result, const void *data, void *user_data) |
callback, |
|
|
void * |
user_data |
|
) |
| |
Asynchronously read a file's contents.
- Parameters
-
| task | The running task. |
| path | The path to the file. |
| callback | A callback that will be called with the file contents. |
| user_data | User data that will be provided to the callback. |
◆ tf_file_stat()
| void tf_file_stat |
( |
tf_task_t * |
task, |
|
|
const char * |
path, |
|
|
void(*)(tf_task_t *task, const char *path, int result, const uv_stat_t *stat, void *user_data) |
callback, |
|
|
void * |
user_data |
|
) |
| |
Asynchronously stat() a file.
- Parameters
-
| task | The running task. |
| path | The path to the file to stat(). |
| callback | A function that will be called with the stat result. |
| user_data | User data that will be passed to the callback. |