摘要: 1. chdir修改当前进程的工作目录 (man 2 chdir 查看) int chdir(const char *path); //path路径 int fchdir(int fd); //fd文件描述符 返回值:成功返回0;失败返回-1 。 2. getcwd获取当前进程的工作目录 char 阅读全文
posted @ 2017-04-30 23:03 yongfengnice 阅读(477) 评论(0) 推荐(0)
摘要: 1. open打开文件 (man 2 open 查看) int open(const char *pathname, int flags); //pathname文件名(路径);flags打开模式,有O_RDONLY, O_WRONLY, O_RDWR int open(const char *pa 阅读全文
posted @ 2017-04-30 22:59 yongfengnice 阅读(4232) 评论(0) 推荐(0)