CCEngine/CCEngineLoader/CCEngineLoader.cpp

34 lines
1.4 KiB
C++
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

// CCEngineLoader.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
#include <boost/filesystem.hpp>
#include <fstream>
namespace fs = boost::filesystem;
int main(int argc, char* argv[])
{
auto appDir = fs::system_complete(argv[0]).parent_path();
// TODO: Wait until caller proccess terminates
auto removeList = appDir / ".upd" / ".remove";
if (fs::is_regular_file(removeList))
{
std::ifstream infile("thefile.txt");
std::string line;
while (std::getline(infile, line))
{
if (!line.empty())
{
fs::remove(appDir / line);
}
}
}
return 0;
}