1. 首页
  2. 数据库
  3. 其它
  4. fileutils:C ++文件实用程序 源码

fileutils:C ++文件实用程序 源码

上传者: 2021-04-21 11:24:49上传 ZIP文件 11.28KB 热度 15次
fileutils fileutils具有实用程序功能,可以读取,写入和同步文件。 用例 写文件: write("/tmp/myfile.txt", std::string_view{"Hello, world!"}); 将文件同步到存储: sync("/tmp/myfile.txt"); 读取文件: std::string contents = read_as_string("/tmp/myfile.txt"); 原子写入文件: atomic_write( "/tmp/myfile.txt", "/tmp/myfile.txt.tmp", std::string_view{"Hello, world!"}); 制作指南 该项目需要Catch2来构建和运行测试。 要禁用测试构建,请传递CMake参数'-DBUILD_TESTING:BOOL = FALSE'。 Ca
下载地址
用户评论