c - 使用打开/读取时如何检测文件结尾?

标签 c linux

我正在使用打开/读取功能,fopen/fread 有 feof 来检测文件结束,打开/读取的等效方法是什么?

最佳答案

来自 man read :

On success, the number of bytes read is returned (zero indicates end of file), ...

关于c - 使用打开/读取时如何检测文件结尾?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9806786/

相关文章:

linux - 操作系统检测中的语法问题

objective-c - 在 forwar 类对象 CALayer 中找不到属性 anchorPoint

linux - 无法在 Raspbian 上挂载 Samba 共享,在 Debian 上运行完美

c - unlocked_ioctl 与普通 ioctl

c - 除非存在另一个 printf,否则 Printf 不起作用

linux - X86:在不引用标准库的情况下进行系统调用

c - Interbench 基准代码

c - 检测到堆损坏 C

c - 哪个定义更好?

c - 这个程序有什么问题?