14#include "tuya_cloud_types.h"
166TUYA_FILE
tkl_fopen(CONST CHAR_T* path, CONST CHAR_T* mode);
190INT_T
tkl_fread(VOID_T* buf, INT_T bytes, TUYA_FILE file);
227CHAR_T*
tkl_fgets(CHAR_T* buf, INT_T len, TUYA_FILE file);
251INT_T
tkl_fseek(TUYA_FILE file, INT64_T offs, INT_T whence);
INT_T tkl_fs_mkdir(CONST CHAR_T *path)
Make directory
INT_T tkl_fileno(TUYA_FILE file)
get the file fd
INT_T tkl_dir_close(TUYA_DIR dir)
Close directory
INT_T tkl_fgetc(TUYA_FILE file)
read the next character from stream
INT_T tkl_dir_is_regular(TUYA_FILEINFO info, BOOL_T *is_regular)
Check whether the node is a normal file
INT_T tkl_fs_mode(CONST CHAR_T *path, UINT_T *mode)
Get file mode
INT64_T tkl_ftell(TUYA_FILE file)
Get current position of file
INT_T tkl_fseek(TUYA_FILE file, INT64_T offs, INT_T whence)
Seek to the offset position of the file
INT_T tkl_fclose(TUYA_FILE file)
Close file
INT_T tkl_dir_open(CONST CHAR_T *path, TUYA_DIR *dir)
Open directory
INT_T tkl_ftruncate(INT_T fd, UINT64_T length)
truncate one file according to the length
INT_T tkl_fsync(INT_T fd)
write buffer to flash
TUYA_FILE tkl_fopen(CONST CHAR_T *path, CONST CHAR_T *mode)
Open file
INT_T tkl_dir_name(TUYA_FILEINFO info, CONST CHAR_T **name)
Get the name of the file node
INT_T tkl_dir_read(TUYA_DIR dir, TUYA_FILEINFO *info)
Read directory
INT_T tkl_faccess(CONST CHAR_T *filepath, INT_T mode)
Judge if the file can be access
INT_T tkl_fs_remove(CONST CHAR_T *path)
Remove directory
CHAR_T * tkl_fgets(CHAR_T *buf, INT_T len, TUYA_FILE file)
Read string from file
INT_T tkl_feof(TUYA_FILE file)
Check wheather to reach the end fo the file
INT_T tkl_dir_is_directory(TUYA_FILEINFO info, BOOL_T *is_dir)
Check whether the node is a directory
INT_T tkl_fflush(TUYA_FILE file)
flush the IO read/write stream
INT_T tkl_fread(VOID_T *buf, INT_T bytes, TUYA_FILE file)
Read file
INT_T tkl_fs_rename(CONST CHAR_T *path_old, CONST CHAR_T *path_new)
File rename
INT_T tkl_fgetsize(CONST CHAR_T *filepath)
Get file size
INT_T tkl_fs_is_exist(CONST CHAR_T *path, BOOL_T *is_exist)
Check whether the file or directory exists
INT_T tkl_fwrite(VOID_T *buf, INT_T bytes, TUYA_FILE file)
write file