摘要: 函数lseek 使用 lseek 函数显式的为一个打开文件设置偏移量。 每个打开的文件都有一个与其关联的“当前文件偏移量”。它通常是个非负整数,用于度量从文件开始处计算的字节数。 读、写操作都从当前文件偏移量处开始,并使偏移量增加所读写的字节数。 #include <unistd.h> off_t 阅读全文
posted @ 2021-11-05 11:19 zju_cxl 阅读(97) 评论(0) 推荐(0) 编辑
摘要: 函数open和openat #include <fcntl.h> int open(const char* path,int oflag,.../*mode_t mode*/); int openat(int fd,const char*path,int oflag,.../*mode_t mode 阅读全文
posted @ 2021-11-05 00:11 zju_cxl 阅读(151) 评论(0) 推荐(0) 编辑