17 #ifndef __IOTC_BSP_IO_FS_H__ 18 #define __IOTC_BSP_IO_FS_H__ 24 #include <iotc_error.h> 39 #define IOTC_BSP_IO_FS_INVALID_RESOURCE_HANDLE -1 41 #define iotc_bsp_io_fs_init_resource_handle() \ 42 IOTC_BSP_IO_FS_INVALID_RESOURCE_HANDLE 136 const char*
const resource_name,
const size_t size,
163 const uint8_t** buffer,
size_t*
const buffer_size);
179 const uint8_t*
const buffer,
const size_t buffer_size,
const size_t offset,
180 size_t*
const bytes_written);
iotc_bsp_io_fs_state_t iotc_bsp_io_fs_write(const iotc_bsp_io_fs_resource_handle_t resource_handle, const uint8_t *const buffer, const size_t buffer_size, const size_t offset, size_t *const bytes_written)
iotc_bsp_io_fs_state_t iotc_bsp_io_fs_stat(const char *const resource_name, iotc_bsp_io_fs_stat_t *resource_stat)
Gets the size of a file.
enum iotc_bsp_io_fs_state_e iotc_bsp_io_fs_state_t
The file management function states.
The function isn't implmented on your platform.
iotc_bsp_io_fs_state_t iotc_bsp_io_fs_read(const iotc_bsp_io_fs_resource_handle_t resource_handle, const size_t offset, const uint8_t **buffer, size_t *const buffer_size)
Reads a file.
struct iotc_bsp_io_fs_stat_s iotc_bsp_io_fs_stat_t
The size of TLS server authentication certificates.
enum iotc_bsp_io_fs_resource_type_e iotc_bsp_io_fs_resource_type_t
The resource type of TLS certificates.
intptr_t iotc_bsp_io_fs_resource_handle_t
A pointer to an open file.
enum iotc_bsp_io_fs_open_flags iotc_bsp_io_fs_open_flags_t
The file operations.
The file can't be removed.
size_t resource_size
The size, in bytes, of the resource.
iotc_bsp_io_fs_resource_type_e
iotc_bsp_io_fs_state_t iotc_bsp_io_fs_remove(const char *const resource_name)
Deletes a file.
Can't write data to file.
The file isn't available.
A TLS certificate resource.
iotc_bsp_io_fs_state_t iotc_bsp_io_fs_open(const char *const resource_name, const size_t size, const iotc_bsp_io_fs_open_flags_t open_flags, iotc_bsp_io_fs_resource_handle_t *resource_handle_out)
The size of TLS server authentication certificates.
The file management function succeeded.
iotc_bsp_io_fs_open_flags
The device is out of memory.
Open and append to the file.
Open and write to the file.
The file is read-only so the SDK can't open it.
iotc_bsp_io_fs_state_t iotc_bsp_io_fs_close(const iotc_bsp_io_fs_resource_handle_t resource_handle)