|
TuyaOS
|
Common process - Initialization 更多...
#include "tuya_cloud_types.h"

函数 | |
| INT_T | tal_dir_close (TUYA_DIR dir) |
| Close directory 更多... | |
| INT_T | tal_dir_is_directory (TUYA_FILEINFO info, BOOL_T *is_dir) |
| Check whether the node is a directory 更多... | |
| INT_T | tal_dir_is_regular (TUYA_FILEINFO info, BOOL_T *is_regular) |
| Check whether the node is a normal file 更多... | |
| INT_T | tal_dir_name (TUYA_FILEINFO info, CONST CHAR_T **name) |
| Get the name of the file node 更多... | |
| INT_T | tal_dir_open (CONST CHAR_T *path, TUYA_DIR *dir) |
| Open directory 更多... | |
| INT_T | tal_dir_read (TUYA_DIR dir, TUYA_FILEINFO *info) |
| Read directory 更多... | |
| INT_T | tal_faccess (IN CONST CHAR_T *filepath, IN INT_T mode) |
| Judge if the file can be access 更多... | |
| INT_T | tal_fclose (TUYA_FILE file) |
| Close file 更多... | |
| INT_T | tal_feof (TUYA_FILE file) |
| Check wheather to reach the end fo the file 更多... | |
| INT_T | tal_fflush (IN TUYA_FILE file) |
| flush the IO read/write stream 更多... | |
| INT_T | tal_fgetc (IN TUYA_FILE file) |
| read the next character from stream 更多... | |
| CHAR_T * | tal_fgets (CHAR_T *buf, INT_T len, TUYA_FILE file) |
| Read string from file 更多... | |
| INT_T | tal_fgetsize (IN CONST CHAR_T *filepath) |
| Get file size 更多... | |
| INT_T | tal_fileno (IN TUYA_FILE file) |
| get the file fd 更多... | |
| TUYA_FILE | tal_fopen (CONST CHAR_T *path, CONST CHAR_T *mode) |
| Open file 更多... | |
| INT_T | tal_fread (VOID_T *buf, INT_T bytes, TUYA_FILE file) |
| Read file 更多... | |
| INT_T | tal_fs_is_exist (CONST CHAR_T *path, BOOL_T *is_exist) |
| Check whether the file or directory exists 更多... | |
| INT_T | tal_fs_mkdir (CONST CHAR_T *path) |
| Make directory 更多... | |
| INT_T | tal_fs_mode (CONST CHAR_T *path, UINT_T *mode) |
| Get file mode 更多... | |
| INT_T | tal_fs_remove (CONST CHAR_T *path) |
| Remove directory 更多... | |
| INT_T | tal_fs_rename (CONST CHAR_T *path_old, CONST CHAR_T *path_new) |
| File rename 更多... | |
| INT_T | tal_fseek (TUYA_FILE file, INT64_T offs, INT_T whence) |
| Seek to the offset position of the file 更多... | |
| INT_T | tal_fsync (INT_T fd) |
| write buffer to flash 更多... | |
| INT64_T | tal_ftell (TUYA_FILE file) |
| Get current position of file 更多... | |
| INT_T | tal_ftruncate (INT_T fd, UINT64_T length) |
| truncate one file according to the length 更多... | |
| INT_T | tal_fwrite (VOID_T *buf, INT_T bytes, TUYA_FILE file) |
| write file 更多... | |
Common process - Initialization
| INT_T tal_dir_close | ( | TUYA_DIR | dir | ) |
Close directory
| [in] | dir | handle of directory |
| INT_T tal_dir_is_directory | ( | TUYA_FILEINFO | info, |
| BOOL_T * | is_dir | ||
| ) |
Check whether the node is a directory
| [in] | info | file information |
| [out] | is_dir | is directory or not |
| INT_T tal_dir_is_regular | ( | TUYA_FILEINFO | info, |
| BOOL_T * | is_regular | ||
| ) |
Check whether the node is a normal file
| [in] | info | file information |
| [out] | is_regular | is normal file or not |
| INT_T tal_dir_name | ( | TUYA_FILEINFO | info, |
| CONST CHAR_T ** | name | ||
| ) |
Get the name of the file node
| [in] | info | file information |
| [out] | name | file name |
| INT_T tal_dir_open | ( | CONST CHAR_T * | path, |
| TUYA_DIR * | dir | ||
| ) |
Open directory
| [in] | path | path of directory |
| [out] | dir | handle of directory |
| INT_T tal_dir_read | ( | TUYA_DIR | dir, |
| TUYA_FILEINFO * | info | ||
| ) |
Read directory
| [in] | dir | handle of directory |
| [out] | info | file information |
| INT_T tal_faccess | ( | IN CONST CHAR_T * | filepath, |
| IN INT_T | mode | ||
| ) |
Judge if the file can be access
| [in] | filepath | file path + file name |
| [in] | mode | access mode |
| INT_T tal_fclose | ( | TUYA_FILE | file | ) |
Close file
| [in] | file | file handle |
| INT_T tal_feof | ( | TUYA_FILE | file | ) |
Check wheather to reach the end fo the file
| [in] | file | file handle |
| INT_T tal_fflush | ( | IN TUYA_FILE | file | ) |
flush the IO read/write stream
| [in] | file | char stream |
| INT_T tal_fgetc | ( | IN TUYA_FILE | file | ) |
read the next character from stream
| [in] | file | char stream |
| CHAR_T * tal_fgets | ( | CHAR_T * | buf, |
| INT_T | len, | ||
| TUYA_FILE | file | ||
| ) |
Read string from file
| [in] | buf | buffer for reading file |
| [in] | len | buffer size |
| [in] | file | file handle |
| INT_T tal_fgetsize | ( | IN CONST CHAR_T * | filepath | ) |
Get file size
| [in] | filepath | file path + file name |
| INT_T tal_fileno | ( | IN TUYA_FILE | file | ) |
get the file fd
| [in] | file | char stream |
| TUYA_FILE tal_fopen | ( | CONST CHAR_T * | path, |
| CONST CHAR_T * | mode | ||
| ) |
Open file
| [in] | path | path of file |
| [in] | mode | file open mode: "r","w"... |
| INT_T tal_fread | ( | VOID_T * | buf, |
| INT_T | bytes, | ||
| TUYA_FILE | file | ||
| ) |
Read file
| [in] | buf | buffer for reading file |
| [in] | bytes | buffer size |
| [in] | file | file handle |
| INT_T tal_fs_is_exist | ( | CONST CHAR_T * | path, |
| BOOL_T * | is_exist | ||
| ) |
Check whether the file or directory exists
| [in] | path | path of directory |
| [out] | is_exist | the file or directory exists or not |
| INT_T tal_fs_mkdir | ( | CONST CHAR_T * | path | ) |
Make directory
| [in] | path | path of directory |
| INT_T tal_fs_mode | ( | CONST CHAR_T * | path, |
| UINT_T * | mode | ||
| ) |
Get file mode
| [in] | path | path of directory |
| [out] | mode | bit attibute of directory |
| INT_T tal_fs_remove | ( | CONST CHAR_T * | path | ) |
Remove directory
| [in] | path | path of directory |
| INT_T tal_fs_rename | ( | CONST CHAR_T * | path_old, |
| CONST CHAR_T * | path_new | ||
| ) |
File rename
| [in] | path_old | old path of directory |
| [in] | path_new | new path of directory |
| INT_T tal_fseek | ( | TUYA_FILE | file, |
| INT64_T | offs, | ||
| INT_T | whence | ||
| ) |
Seek to the offset position of the file
| [in] | file | file handle |
| [in] | offs | offset |
| [in] | whence | seek start point mode |
| INT_T tal_fsync | ( | INT_T | fd | ) |
write buffer to flash
| [in] | fd | file fd |
| INT64_T tal_ftell | ( | TUYA_FILE | file | ) |
Get current position of file
| [in] | file | file handle |
| INT_T tal_ftruncate | ( | INT_T | fd, |
| UINT64_T | length | ||
| ) |
truncate one file according to the length
| [in] | fd | file description |
| [in] | length | the length want to truncate |
| INT_T tal_fwrite | ( | VOID_T * | buf, |
| INT_T | bytes, | ||
| TUYA_FILE | file | ||
| ) |
write file
| [in] | buf | buffer for writing file |
| [in] | bytes | buffer size |
| [in] | file | file handle |