“r” : O_RDONLY //只读
“r+”: O_RDWR //读写
“w” : O_WRONLY|O_CREAT|O_TRUNC //只写,创建,清空
“w+”: O_RDWR|O_CREAT|O_TRUNC //读写,创建,清空
“a” : O_WRONLY|O_APPEND|O_CREAT //只写,创建,追加
“a+”: O_RDWR|O_APPEND|O_CREAT //读写,创建,追加
fopen: r r+ w w+ a a+ 要求写出open函数对应打开方式的组合
于 2022-12-06 19:35:54 首次发布