MCPcopy Create free account
hub / github.com/computationalpathologygroup/ASAP / getWindowsDriveLetters

Function getWindowsDriveLetters

core/filetools.cpp:992–1010  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

990 }
991
992 std::vector<std::string> getWindowsDriveLetters()
993 {
994 std::vector<std::string> driveletters;
995#ifdef WIN32
996 DWORD bitmask = GetLogicalDrives();
997 char driveletter = 'A';
998 std::string empty;
999 for (char i = 0; i < 32; i++)
1000 {
1001 if (bitmask & 0x1)
1002 {
1003 driveletters.push_back(empty + (char)(driveletter + i));
1004 empty = "";
1005 }
1006 bitmask >>= 1;
1007 }
1008#endif
1009 return driveletters;
1010 }
1011
1012 std::string getDirSeparator()
1013 {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected