X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=getcurrentcommand.cpp;h=b9b907d903752d8a93979680d361c2ea683c7cab;hb=1ef03d78c36b105e87165ad1ebc9af29cd6144b7;hp=86046b64375ebd151c27e5909c0efdc9d0149bbf;hpb=5a4ac4f954c4b4445bcee272f1f8220ddcc9c1e4;p=mothur.git diff --git a/getcurrentcommand.cpp b/getcurrentcommand.cpp index 86046b6..b9b907d 100644 --- a/getcurrentcommand.cpp +++ b/getcurrentcommand.cpp @@ -12,9 +12,9 @@ //********************************************************************************************************************** vector GetCurrentCommand::setParameters(){ try { - CommandParameter pclear("clear", "String", "", "", "", "", "",false,false); parameters.push_back(pclear); - CommandParameter pinputdir("inputdir", "String", "", "", "", "", "",false,false); parameters.push_back(pinputdir); - CommandParameter poutputdir("outputdir", "String", "", "", "", "", "",false,false); parameters.push_back(poutputdir); + CommandParameter pclear("clear", "String", "", "", "", "", "","",false,false); parameters.push_back(pclear); + CommandParameter pinputdir("inputdir", "String", "", "", "", "", "","",false,false); parameters.push_back(pinputdir); + CommandParameter poutputdir("outputdir", "String", "", "", "", "", "","",false,false); parameters.push_back(poutputdir); vector myArray; for (int i = 0; i < parameters.size(); i++) { myArray.push_back(parameters[i].name); } @@ -90,7 +90,9 @@ int GetCurrentCommand::execute(){ try { if (abort == true) { if (calledHelp) { return 0; } return 2; } - + + cFactory = CommandFactory::getInstance(); + //user wants to clear a type if (types.size() != 0) { for (int i = 0; i < types.size(); i++) { @@ -142,6 +144,8 @@ int GetCurrentCommand::execute(){ m->setBiomFile(""); }else if (types[i] == "count") { m->setCountTableFile(""); + }else if (types[i] == "summary") { + m->setSummaryFile(""); }else if (types[i] == "processors") { m->setProcessors("1"); }else if (types[i] == "all") { @@ -156,8 +160,31 @@ int GetCurrentCommand::execute(){ m->mothurOutEndLine(); m->mothurOut("Current files saved by mothur:"); m->mothurOutEndLine(); m->printCurrentFiles(); } + + string inputDir = cFactory->getInputDir(); + if (inputDir != "") { + m->mothurOutEndLine(); m->mothurOut("Current input directory saved by mothur: " + inputDir); m->mothurOutEndLine(); + } + + string outputDir = cFactory->getOutputDir(); + if (outputDir != "") { + m->mothurOutEndLine(); m->mothurOut("Current output directory saved by mothur: " + outputDir); m->mothurOutEndLine(); + } + string defaultPath = m->getDefaultPath(); + if (defaultPath != "") { + m->mothurOutEndLine(); m->mothurOut("Current default directory saved by mothur: " + defaultPath); m->mothurOutEndLine(); + } + + + string temp = "./"; +#if defined (__APPLE__) || (__MACH__) || (linux) || (__linux) || (__linux__) || (__unix__) || (__unix) +#else + temp = ".\\"; +#endif + temp = m->getFullPathName(temp); + m->mothurOutEndLine(); m->mothurOut("Current working directory: " + temp); m->mothurOutEndLine(); - return 0; + return 0; } catch(exception& e) {