C for linux 更改当前工做目录函数 chdir 或 fchdir

头文件:#include <unistd.h> 用法格式:int chdir ( const char *path );                   int fchdir ( int fd ); chdir用来将当前工做目录改成参数path指定的目录。 注意:path指针指向的参数必定是连续的路径且不能带空格,不然将会返回 -1 。 例如: #include <stdio.h> #incl
相关文章
相关标签/搜索