ZHCU876Z July 2001 – October 2023 SM320F28335-EP
从文件读取字符
#include <file.h>
int read (int file_descriptor , char *buffer , unsignedcount );
read 函数从与 file_descriptor 关联的文件读取 count 个字符并将其放入 buffer。
该函数将返回以下值之一:
| 0 | 如果在读取任何字节前达到 EOF |
| # | 读取的字符数量(可能少于 count) |
| -1 | 失败时 |