X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Ftask.cpp;h=75b725ede8657cc760efaa07d0bb92456b51975e;hb=HEAD;hp=d969a7afa495f4c7076b5a8583b94679b0f25650;hpb=7c2db9e2b91da953701be233336c5bfa1f3c4af0;p=builder.git diff --git a/source/task.cpp b/source/task.cpp deleted file mode 100644 index d969a7a..0000000 --- a/source/task.cpp +++ /dev/null @@ -1,39 +0,0 @@ -#include -#include -#include -#include "task.h" - -using namespace std; -using namespace Msp; - -Task::Task(): - unlink(false) -{ } - -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); - } - } -}