From 51e21a316be6e052251b3dfc7d671061ebd67cee Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Mon, 21 Dec 2009 18:03:28 +0000 Subject: Removed the old trunk contents. About to load up m3 --- src/functiondirectoriesin.cpp | 69 ------------------------------------------- 1 file changed, 69 deletions(-) delete mode 100644 src/functiondirectoriesin.cpp (limited to 'src/functiondirectoriesin.cpp') diff --git a/src/functiondirectoriesin.cpp b/src/functiondirectoriesin.cpp deleted file mode 100644 index 0ebbbc8..0000000 --- a/src/functiondirectoriesin.cpp +++ /dev/null @@ -1,69 +0,0 @@ -#include - -#include "functiondirectoriesin.h" -#include "bu/plugger.h" - -PluginInterface2(directoriesIn, FunctionDirectoriesIn, Function, "Mike Buland", 0, 1 ); - -FunctionDirectoriesIn::FunctionDirectoriesIn() -{ -} - -FunctionDirectoriesIn::~FunctionDirectoriesIn() -{ -} - -void FunctionDirectoriesIn::execute( Build *bld, const StringList &lInput, StringList &lOutput ) -{ - DIR *d = opendir( lParams.front().c_str() ); - if( d == NULL ) - throw BuildException( - "Can't open directory %s.", - lParams.front().c_str() - ); - - struct dirent *e; - - std::string prefix; - if( lParams.size() >= 2 ) - { - StringList::iterator i = lParams.begin(); - i++; - prefix = *i; - } - else - { - prefix = lParams.front() + "/"; - } - - while( (e = readdir( d )) ) - { - if( e->d_type == DT_DIR ) - { - if( e->d_name[0] == '.' || e->d_name[0] == '\0' ) - continue; - std::string sOut = prefix + e->d_name; - lOutput.push_back( sOut ); - if( bld ) - { - std::string sV = lParams.front() + "/"; - sV += e->d_name; - bld->set( sOut, "fulldir", sV ); - } - else - { - printf("no build access.\n"); - } - } - } - - closedir( d ); -} - -Function *FunctionDirectoriesIn::duplicate( Build &bld, const StringList *cont, VarMap *mExtra ) -{ - Function *pRet = new FunctionDirectoriesIn(); - pRet->copyData( this, bld, cont, mExtra ); - return pRet; -} - -- cgit v1.2.3