11#include "tuya_cloud_types.h"
uFILE * ufopen(IN CHAR_T *filepath, IN CHAR_T *mode)
open a unique file
INT_T ufaccess(IN CHAR_T *filepath, IN INT_T mode)
test the permission of the unique file
BOOL_T ufeof(IN uFILE *fd)
check if the current offset reach the end of the file
OPERATE_RET ufdelete(IN CHAR_T *filepath)
delete the unique file
INT_T ufflush(IN uFILE *stream)
flush the unique file, write the cache to physical disk
UINT_T ufread(IN uFILE *fd, IN UCHAR_T *buf, IN CONST UINT_T len)
read from unique file
VOID uFILE
unique file handle
Definition: tuya_uf_db.h:22
INT_T ufseek(IN uFILE *fd, IN UINT_T offset, IN CONST ufmode_t uf_mode)
seek to the offset of the unique file
INT_T ufsync(IN INT_T fd)
sync the unique file, write the file info to pysical disk
CHAR_T * ufgets(IN CHAR_T *s, IN INT_T n, IN uFILE *stream)
read a line from unique file
BOOL_T ufexist(IN CHAR_T *filepath)
check if unique file is exist
unsigned char ufmode_t
unique file mode
Definition: tuya_uf_db.h:28
UINT_T ufwrite_raw_start(IN uFILE *fd)
enter ufwrite raw mode
INT_T ufgetsize(IN CHAR_T *filepath)
get the size of the unique file
OPERATE_RET ufclose(IN uFILE *fd)
close a unique file
OPERATE_RET ufformat(VOID)
format uf flash
OPERATE_RET ufinit(VOID)
unique file system initialization
INT_T ufileno(IN uFILE *stream)
get the file description
UINT_T ufwrite_raw_end(IN uFILE *fd)
Exit ufwrite raw mode
OPERATE_RET uf_db_init(VOID)
tuya unique file database system initialization
OPERATE_RET uf_db_user_param_read(OUT BYTE_T **buf, OUT UINT_T *len)
read user parameter from unique file database
INT_T uftell(IN uFILE *fd)
get current offset of the unique file
INT_T ufprintf(IN uFILE *stream, IN const char *pFmt,...)
write a specail format to unique file
INT_T ufgetc(IN uFILE *stream)
read a character from unique file
OPERATE_RET uf_db_user_param_write(IN BYTE_T *data, IN CONST UINT_T len)
write user parameter to unique file database
INT_T ufscanf(IN uFILE *stream, IN INT_T count, IN PCHAR_T pFmt,...)
read a special format from unique file
UINT_T ufwrite(IN uFILE *fd, IN UCHAR_T *buf, IN CONST UINT_T len)
write to unique file