系统文件
文章平均质量分 74
weixin_40878579
这个作者很懒,什么都没留下…
展开
-
unix/linux系统读写文件
1 open函数需要的头文件#include<sys/types.h>#include<sys/stat.h>#include<fcntl.h>函数原型:int open(const char*pathname,int flags);int open(const char*pathname,int flags,mode_t mode);pathname:路径fl...原创 2018-03-31 14:21:48 · 1416 阅读 · 0 评论 -
unix/linux系统函数之lseak
头文件:#include <sys/types.h> #include <unistd.h>原型 off_t lseek(int fd, off_t offset, int whence) int fd --> 文件描述符 off_t offset --> 偏移量 int whence --> 偏移位置 SEEK_SET - 从文件头向...原创 2018-03-31 14:53:54 · 271 阅读 · 0 评论 -
linux系统文件操作函数(一)
1 stat函数头文件: #include <sys/stat.h> #include <unistd.h>函数原型: int stat(const char *file_name, struct stat *buf);函数说明: 通过文件名filename获取文件信息,并保存在buf所指的结构体stat中返回值: 执...原创 2018-04-02 16:27:35 · 303 阅读 · 0 评论