MCPcopy Create free account
hub / github.com/davisking/dlib / get_current_dir

Function get_current_dir

dlib/misc_api/misc_api_kernel_1.cpp:60–75  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

58 }
59
60 std::string get_current_dir (
61 )
62 {
63 // need to lock a mutex here because getting and setting the
64 // current working directory is not thread safe on windows.
65 auto_mutex lock(cwd_mutex());
66 char buf[1024];
67 if (GetCurrentDirectoryA(sizeof(buf),buf) == 0)
68 {
69 return std::string();
70 }
71 else
72 {
73 return std::string(buf);
74 }
75 }
76
77// ----------------------------------------------------------------------------------------
78

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected