Lines Matching refs:fs
63 namespace fs = std::filesystem; in DecompressFiles()
64 for (const auto& file : fs::recursive_directory_iterator(directory)) { in DecompressFiles()
65 fs::path src_path = file.path(); in DecompressFiles()
67 fs::path dst_path = fs::path(src_path).replace_extension(); // Remove .gz extension. in DecompressFiles()
68 if (!fs::exists(dst_path) || fs::last_write_time(src_path) > fs::last_write_time(dst_path)) { in DecompressFiles()
71 fs::path tmp_path = fs::path(src_path).replace_extension("." + std::to_string(getpid())); in DecompressFiles()
80 fs::rename(tmp_path, dst_path); in DecompressFiles()
87 namespace fs = std::filesystem; in CreateLinks()
88 for (const auto& file : fs::recursive_directory_iterator(directory)) { in CreateLinks()
89 fs::path src_path = file.path(); in CreateLinks()
90 if (fs::is_regular_file(src_path) && src_path.filename() == "links.txt") { in CreateLinks()
95 fs::path parent_path = src_path.parent_path(); in CreateLinks()
109 fs::path target(parent_path); in CreateLinks()
110 target /= fs::path(values[0]); in CreateLinks()
111 fs::path source(parent_path); in CreateLinks()
112 source /= fs::path(values[1]); in CreateLinks()
113 if (!fs::exists(source)) { in CreateLinks()
117 fs::create_symlink(target, source, ec); in CreateLinks()