rename filesystem namespace
This commit is contained in:
parent
a3d95101b3
commit
dac46935c7
3 changed files with 16 additions and 10 deletions
|
@ -3,7 +3,9 @@
|
|||
#include <xlnt/xlnt.hpp>
|
||||
#include <fstream>
|
||||
|
||||
void ExcelReader::readSellersFromFile(const std::filesystem::path& filePath, Marketplace* market)
|
||||
namespace fs = std::filesystem;
|
||||
|
||||
void ExcelReader::readSellersFromFile(const fs::path& filePath, Marketplace* market)
|
||||
{
|
||||
xlnt::workbook wb;
|
||||
std::ifstream mystream(filePath, std::ios::binary);
|
||||
|
|
|
@ -5,7 +5,9 @@
|
|||
|
||||
#include <fstream>
|
||||
|
||||
void JsonUtil::exportSellers(const std::filesystem::path& filePath, Marketplace* market)
|
||||
namespace fs = std::filesystem;
|
||||
|
||||
void JsonUtil::exportSellers(const fs::path& filePath, Marketplace* market)
|
||||
{
|
||||
Json::Value root;
|
||||
std::ofstream file(filePath);
|
||||
|
@ -29,7 +31,7 @@ void JsonUtil::exportSellers(const std::filesystem::path& filePath, Marketplace*
|
|||
writer->write(root, &file);
|
||||
}
|
||||
|
||||
void JsonUtil::importSellers(const std::filesystem::path& filePath, Marketplace* market)
|
||||
void JsonUtil::importSellers(const fs::path& filePath, Marketplace* market)
|
||||
{
|
||||
for (auto& seller : market->getSellers()) {
|
||||
seller->setState(Seller::State::DELETE);
|
||||
|
@ -67,7 +69,7 @@ void JsonUtil::importSellers(const std::filesystem::path& filePath, Marketplace*
|
|||
market->storeToDb();
|
||||
}
|
||||
|
||||
void JsonUtil::exportSales(const std::filesystem::path& filePath, Marketplace* market, int cashPointNo)
|
||||
void JsonUtil::exportSales(const fs::path& filePath, Marketplace* market, int cashPointNo)
|
||||
{
|
||||
Json::Value root;
|
||||
std::ofstream file(filePath);
|
||||
|
@ -106,7 +108,7 @@ void JsonUtil::exportSales(const std::filesystem::path& filePath, Marketplace* m
|
|||
writer->write(root, &file);
|
||||
}
|
||||
|
||||
void JsonUtil::importSales(const std::filesystem::path& filePath, Marketplace* market, int cashPointNo)
|
||||
void JsonUtil::importSales(const fs::path& filePath, Marketplace* market, int cashPointNo)
|
||||
{
|
||||
Json::Value jsonValues;
|
||||
std::ifstream file(filePath);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue