X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Ftask.cpp;h=75b725ede8657cc760efaa07d0bb92456b51975e;hb=HEAD;hp=e72a7415de285767ee93369051fb384113b8d2a1;hpb=d1f9551e05c9d341149eb490e05b1465d3d6b711;p=builder.git diff --git a/source/task.cpp b/source/task.cpp deleted file mode 100644 index e72a741..0000000 --- a/source/task.cpp +++ /dev/null @@ -1,35 +0,0 @@ -#include -#include -#include -#include "task.h" - -using namespace std; -using namespace Msp; - -void Task::add_file(const FS::Path &f) -{ - files.push_back(f); -} - -void Task::set_unlink(bool u) -{ - unlink = u; -} - -void Task::prepare() -{ - for(const FS::Path &f: files) - { - if(FS::exists(f)) - { - // If the file exists, the directory it's in must exist too - FS::unlink(f); - } - else - { - FS::Path dir = FS::dirname(f); - if(!FS::exists(dir)) - FS::mkpath(dir, 0755); - } - } -}