1 Star 0 Fork 0

Chenjingzhi-cjb/FolderSync

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
main_general_tool.cpp 820 Bytes
一键复制 编辑 原始数据 按行查看 历史
#include <string>
#include "FolderSync.hpp"
using namespace std;
// Is used to build an easy-to-use command-line "general folder synchronization" tool.
// Run the following command from the command line:
// ./FolderSyncGeneralTool.exe "src_path" "dst_path1" "dst_path2" ...
int main(int argc, char *argv[]) {
if (argc < 3) {
cout << "Error: Please enter the path to the destination folder!" << endl;
return -1;
}
string src_path = argv[1];
vector<string> dst_paths;
for (int i = 2; i < argc; i++) {
dst_paths.emplace_back(argv[i]);
}
FolderSync folder_sync(src_path, dst_paths);
folder_sync.findDiff();
char flag;
cout << "If you need to update, enter [y/n]:" << endl;
cin >> flag;
if (flag == 'y') folder_sync.update();
return 0;
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C++
1
https://gitee.com/chenjingzhi-cjb/folder-sync.git
[email protected]:chenjingzhi-cjb/folder-sync.git
chenjingzhi-cjb
folder-sync
FolderSync
master

搜索帮助

0d507c66 1850385 C8b1a773 1850385