正在加载图片...
文件操作的系统调用 令创建删除# nclude <sys/types. h ◆打开关闭 include <sys/stat. h> #include <fcntlh> 读/写 int open( const char' pathname, int flags) ◆定位 int open(const char * pathname, int flags, mode t mode) int creat(const char*pathname, mode t mode) 令更名 #include <unistd.h> ssize t write(int fd, const void *buf, size t count) int unlink(const char pathname #include <sys/types.h> include <unistd.h> off t Iseek(int fildes, off t offset, int whence) #include <stdio. h> 2021/2/9 int rename(const char *oldpath, const char newpath)2021/2/9 Linux OS analysis 16/84 文件操作的系统调用 ❖创建/删除 ❖打开/关闭 ❖读/写 ❖定位 ❖更名 #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); int creat(const char *pathname, mode_t mode); #include <unistd.h> ssize_t write(int fd, const void *buf, size_t count); int unlink(const char *pathname); #include <sys/types.h> #include <unistd.h> off_t lseek(int fildes, off_t offset, int whence); #include <stdio.h> int rename(const char *oldpath, const char *newpath);
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有