#include "DPrintWorkDirectoryUtil.h" ccdb::DPrintWorkDirectoryUtil::DPrintWorkDirectoryUtil(void) { mContext = DConsoleContext::Instance(); mContext->RegisterConsoleUtil("pwd", this); } ccdb::DPrintWorkDirectoryUtil::~DPrintWorkDirectoryUtil(void) { } std::string ccdb::DPrintWorkDirectoryUtil::GetHelp() { //we dont have much help for this command string help="Prints current working directory. By default it is /"; return help; } std::string ccdb::DPrintWorkDirectoryUtil::GetDescription() { //we dont have much help for this command string help="Prints current working directory."; return help; } std::string ccdb::DPrintWorkDirectoryUtil::GetExamples() { //what os simplier return string("pwd"); } int ccdb::DPrintWorkDirectoryUtil::Process( int argc, char *argv[], int argcStart/*=2*/ ) { mContext->GetConsole()->WriteLine(mContext->GetWorkDir().c_str()); return 0; }