摘要:
1 版权声明:本文为博主原创文章,未经博主允许不得转载。 2 3 除非你的原件考虑跨平台。 4 5 在Linux编程多使用一些系统函数真的很方便,哎没办法越来越懒~~~~~~ 6 7 今天记录一下dirname 和basename这两个简单的处理文件路径的linux系统函数。 8 9 10 11 1 阅读全文
posted @ 2022-07-11 19:44
墨尔基阿德斯
阅读(259)
评论(0)
推荐(0)
摘要:
1 #include <stdio.h> 2 #include <stdlib.h> 3 #include <string.h> 4 #include <libgen.h> 5 6 int main(int argc, char*argv[]) 7 { 8 char *dirc, *basec, * 阅读全文
posted @ 2022-07-11 17:30
墨尔基阿德斯
阅读(461)
评论(1)
推荐(1)
摘要:
方法一:access函数判断文件夹或者文件是否存在 函数原型:int access(const char *filename, int mode); 所属头文件:windows下 io.h , Linux unistd.h filename:可以填写文件夹路径或者文件路径 mode说明 0 (F_O 阅读全文
posted @ 2022-07-11 17:21
墨尔基阿德斯
阅读(639)
评论(0)
推荐(0)
摘要:
1 root@mkx:~/workspace/learn# cat isFile.c 2 //头文件 3 #include <stdio.h> 4 #include <stdlib.h> 5 #include <sys/stat.h> 6 //代码 7 int main() 8 { 9 char* 阅读全文
posted @ 2022-07-11 17:13
墨尔基阿德斯
阅读(1963)
评论(0)
推荐(0)

浙公网安备 33010602011771号