#include "conditionfileexists.h" #include "target.h" #include #include #include #include using namespace Bu; #include PluginInterface3( pluginConditionFileExists, fileExists, ConditionFileExists, Condition, "Mike Buland", 0, 1 ); ConditionFileExists::ConditionFileExists() { } ConditionFileExists::~ConditionFileExists() { } bool ConditionFileExists::shouldExec( class Runner &r, Target &rTarget ) { for( StrList::const_iterator j = rTarget.getOutputList().begin(); j; j++ ) { // If any input exists, then return true, we should exec. if( !access( (*j).getStr(), F_OK ) ) { return true; } } return false; } Condition *ConditionFileExists::clone() { return new ConditionFileExists(); }