MCPcopy Create free account
hub / github.com/BZFlag-Dev/bzflag / getCurrentDirectory

Method getCurrentDirectory

other_src/astyle/src/astyle_main.cpp:804–811  ·  view source on GitHub ↗

* WINDOWS function to get the current directory. * NOTE: getenv("CD") does not work for Windows Vista. * The Windows function GetCurrentDirectory is used instead. * * @return The path of the current directory */

Source from the content-addressed store, hash-verified

802 * @return The path of the current directory
803 */
804string ASConsole::getCurrentDirectory(const string& fileName_) const
805{
806 char currdir[MAX_PATH];
807 currdir[0] = '\0';
808 if (!GetCurrentDirectory(sizeof(currdir), currdir))
809 error("Cannot find file", fileName_.c_str());
810 return string(currdir);
811}
812
813/**
814 * WINDOWS function to resolve wildcards and recurse into sub directories.

Callers

nothing calls this directly

Calls 2

c_strMethod · 0.80
errorFunction · 0.50

Tested by

no test coverage detected