随笔分类 -  文件IO

摘要:示例 #include <stdio.h> #include <string.h> #include <stdio.h> #include <errno.h> #include <fcntl.h> #include <unistd.h> #include <stdlib.h> #include <s 阅读全文
posted @ 2024-01-17 19:31 starc的miao 阅读(14) 评论(0) 推荐(0)
摘要:fwrite 把 ptr 所指向的数组中的数据写入到给定流 stream 中。 size_t fwrite(const void *ptr, size_t size, size_t nmemb, FILE *stream) 参数 ptr -- 这是指向要被写入的元素数组的指针。 size -- 这是 阅读全文
posted @ 2024-01-16 11:33 starc的miao 阅读(43) 评论(0) 推荐(0)
摘要:/* Linux API:read,write,open function:C实现CP Command */ #include <stdio.h> #include <stdlib.h> #include <unistd.h> // read #include <fcntl.h> // open # 阅读全文
posted @ 2022-11-20 23:47 starc的miao 阅读(74) 评论(0) 推荐(0)
摘要:https://www.runoob.com/cprogramming/c-standard-library-ctype-h.html 阅读全文
posted @ 2022-11-09 02:11 starc的miao 阅读(41) 评论(0) 推荐(0)
摘要:待更新 阅读全文
posted @ 2022-11-09 02:04 starc的miao 阅读(27) 评论(0) 推荐(0)
摘要:待更新 阅读全文
posted @ 2022-11-09 01:40 starc的miao 阅读(25) 评论(0) 推荐(0)
摘要:待更新 阅读全文
posted @ 2022-11-09 01:23 starc的miao 阅读(0) 评论(0) 推荐(0)
摘要:待更新 阅读全文
posted @ 2022-11-09 01:08 starc的miao 阅读(19) 评论(0) 推荐(0)
摘要:待更新 阅读全文
posted @ 2022-11-09 00:21 starc的miao 阅读(19) 评论(0) 推荐(0)
摘要:待更新 阅读全文
posted @ 2022-11-09 00:20 starc的miao 阅读(24) 评论(0) 推荐(0)
摘要:待更新 阅读全文
posted @ 2022-11-09 00:16 starc的miao 阅读(24) 评论(0) 推荐(0)
摘要:文件IO-C库-API 基础IO操作 打开open\creat 文件I/O-open-close 读取read 文件I/O-read-write 写入write 文件I/O-read-write 关闭close 文件I/O-open-close 偏移量lessk 文件I/O-lseek-ioctl 阅读全文
posted @ 2022-11-08 23:54 starc的miao 阅读(62) 评论(0) 推荐(0)
摘要:第一版代码 /* Linux API:chown function:C 实现chmod函数功能,修改文件权限 */ #include <stdio.h> #include <stdlib.h> #include <sys/stat.h> int main(int argc, char **argv) 阅读全文
posted @ 2022-11-02 00:27 starc的miao 阅读(34) 评论(0) 推荐(0)
摘要:第一版 /* Linux API:fflush function:实现交互式 */ #include <stdlib.h> #include <stdio.h> #include <unistd.h> void nemu(void); void fun_sleep(const char *c); i 阅读全文
posted @ 2022-11-01 00:19 starc的miao 阅读(86) 评论(0) 推荐(0)
摘要:remove-指定创建和删除文件 remove /* Linux API:getotp\open\mkdir\rmdir function:选择参数实现创建对应文件和删除功能 */ #include <stdlib.h> #include <fcntl.h> #include <unistd.h> 阅读全文
posted @ 2022-10-31 22:11 starc的miao 阅读(55) 评论(0) 推荐(0)
摘要:第一版 /* Linux API: 实现 ls command */ #include <sys/types.h> #include <dirent.h> #include <unistd.h> #include <stdio.h> int main(int argc , char* argv[]) 阅读全文
posted @ 2022-10-31 20:58 starc的miao 阅读(37) 评论(0) 推荐(0)
摘要:ftell-fseek-rewind ftell-fseeko fgetpos-fsetpos 阅读全文
posted @ 2022-08-24 01:23 starc的miao 阅读(24) 评论(0) 推荐(0)
摘要:格式化输出 fprintf vfprintf 格式化输入 fscanf vfscanf 阅读全文
posted @ 2022-08-24 01:01 starc的miao 阅读(20) 评论(0) 推荐(0)
摘要: 阅读全文
posted @ 2022-08-24 00:57 starc的miao 阅读(9) 评论(0) 推荐(0)
摘要: 阅读全文
posted @ 2022-08-24 00:53 starc的miao 阅读(9) 评论(0) 推荐(0)