SMTP client functions that work with a File System. More...
Functions | |
void * | netSMTPc_fopen (const char *fname) |
Open a file for reading in SMTP client. [interface]. | |
void | netSMTPc_fclose (void *file) |
Close a file previously open in SMTP client. [interface]. | |
uint32_t | netSMTPc_fread (void *file, uint8_t *buf, uint32_t len) |
Read block of data from a file in SMTP client. [interface]. | |
SMTP client functions that work with a File System.
All functions of the File System Interface are located in SMTP_Client_FS.c, which is automatically added to the Network folder of your project. The file is preconfigured for the , so no changes are required. If you want to use a different type of file system, you must add a similar file to your project and implement the interface functions yourself.
The following functions are implemented in this module:
void netSMTPc_fclose | ( | void * | file | ) |
Close a file previously open in SMTP client. [interface].
[in] | file | pointer to the file to close. |
The function netSMTPc_fclose closes the file identified by the file stream pointer.
The function interfaces to the File System Component and will be called by the Network Component automatically. If another file system will be used, refer to the reference implementation in the SMTP_Client_FS.c module.
void void * netSMTPc_fopen | ( | const char * | fname | ) |
Open a file for reading in SMTP client. [interface].
[in] | fname | name of the file to open. |
The function netSMTPc_fopen opens a file for reading.
The argument fname specifies the name of the file to open.
The function interfaces to the File System Component and will be called by the Network Component automatically. If another file system will be used, refer to the reference implementation in the SMTP_Client_FS.c module.
uint32_t netSMTPc_fread | ( | void * | file, |
uint8_t * | buf, | ||
uint32_t | len | ||
) |
Read block of data from a file in SMTP client. [interface].
[in] | file | pointer to the file to read from. |
[out] | buf | block of memory to write data to. |
[in] | len | length of data to read in bytes. |
The function netSMTPc_fread reads len bytes from the file identified by the file stream pointer in the function argument.
The argument buf is a pointer to the buffer where the function stores the data read from the file.
The function interfaces to the File System Component and will be called by the Network Component automatically. If another file system will be used, refer to the reference implementation in the SMTP_Client_FS.c module.