#include <iostream>
#include <string>
#include <sstream>
#include <iomanip>
#include <functional>
#include <experimental/filesystem>
#include <algorithm>
#include <cassert>
#include <map>
#include <fstream>
#include <random>
#include "Radix.h"
namespace fs = std::experimental::filesystem;
int main()
{
std::string root = "./testDir";
fs::create_directories(root);
std::random_device rnd;
std::mt19937 mt(rnd());
Radix r;
std::vector<std::pair<std::string, std::string>> sample_datas;
for (int i = 0; i < 1000; i++) {
std::string o = std::to_string(mt());
std::string n = r.to((unsigned long long)std::stoll(o), 16);
sample_datas.emplace_back(std::pair<std::string, std::string>(o, n));
}
for (auto& data : sample_datas) {
std::string filename = root + "/" + data.first;
std::ofstream{ filename };
}
for (auto& data : sample_datas) {
std::string o = root + "/" + data.first;
std::string n = root + "/" + data.second;
fs::rename(o, n);
}
std::cout << "done." << std::endl;
getchar();
return 0;
}