Revision 2c54c4c3
Added by david.sorber over 2 years ago
| src/copytool_main.cc | ||
|---|---|---|
|
#include <string>
|
||
|
#include <thread>
|
||
|
|
||
|
#include "CopyManagerOptions.h"
|
||
|
#include "CopyManager.h"
|
||
|
|
||
|
namespace sfs = std::filesystem;
|
||
|
|
||
|
|
||
|
|
||
|
int main(int argc, char** argv)
|
||
|
{
|
||
|
std::cout << "Sendfile Copy Util\n" << std::endl;
|
||
|
|
||
|
if (argc < 2)
|
||
|
if (argc < 3)
|
||
|
{
|
||
|
std::cerr << "ERROR: please specify input path\n" << std::endl;
|
||
|
std::cerr << "ERROR: please specify input path and output path\n" << std::endl;
|
||
|
return -1;
|
||
|
}
|
||
|
|
||
|
const std::string inputPath(argv[1]);
|
||
|
DBS::CopyManagerOptions options(argv[1], argv[2]);
|
||
|
|
||
|
for (const auto& dirEntry : sfs::recursive_directory_iterator(inputPath))
|
||
|
{
|
||
|
std::cout << "PATH: " << dirEntry << std::endl;
|
||
|
}
|
||
|
DBS::CopyManager manager(options);
|
||
|
int rc = manager.run();
|
||
|
|
||
|
return 0;
|
||
|
}
|
||
Work in progress.