34 lines
1.4 KiB
C++
34 lines
1.4 KiB
C++
// 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;
|
||
}
|
||
|