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