1 Star 0 Fork 0

Chenjingzhi-cjb/FolderSync

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
main_this_tool.cpp 858 Bytes
一键复制 编辑 原始数据 按行查看 历史
#include <string>
#include "FolderSync.hpp"
using namespace std;
// Is used to build an easy-to-use command-line "this folder synchronization" tool.
// Copy "FolderSyncThisTool.exe" and "libstdc++-6.dll" from the /bin to your source folder
// and run the following command from the command line: ./FolderSyncThisTool.exe "dst_path1" "dst_path2" ...
int main(int argc, char *argv[]) {
if (argc < 2) {
cout << "Error: Please enter the path to the destination folder!" << endl;
return -1;
}
vector<string> dst_paths;
for (int i = 1; i < argc; i++) {
dst_paths.emplace_back(argv[i]);
}
FolderSync folder_sync(".", 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

搜索帮助