MCPcopy Create free account
hub / github.com/TorqueGameEngines/Torque3D / getVolumeNamesList

Method getVolumeNamesList

Engine/source/platformWin32/winFileio.cpp:1146–1168  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1144// Volume Functions
1145
1146void Platform::getVolumeNamesList( Vector<const char*>& out_rNameVector, bool bOnlyFixedDrives )
1147{
1148 DWORD dwDrives = GetLogicalDrives();
1149 DWORD dwMask = 1;
1150 char driveLetter[12];
1151
1152 out_rNameVector.clear();
1153
1154 for(S32 i = 0; i < 32; i++ )
1155 {
1156 dMemset(driveLetter,0,12);
1157 if( dwDrives & dwMask )
1158 {
1159 dSprintf(driveLetter, 12, "%c:", (i + 'A'));
1160
1161 if( bOnlyFixedDrives && GetDriveTypeA(driveLetter) == DRIVE_FIXED )
1162 out_rNameVector.push_back( StringTable->insert( driveLetter ) );
1163 else if ( !bOnlyFixedDrives )
1164 out_rNameVector.push_back( StringTable->insert( driveLetter ) );
1165 }
1166 dwMask <<= 1;
1167 }
1168}
1169
1170void Platform::getVolumeInformationList( Vector<VolumeInformation>& out_rVolumeInfoVector, bool bOnlyFixedDrives )
1171{

Callers

nothing calls this directly

Calls 5

dSprintfFunction · 0.85
dMemsetFunction · 0.70
clearMethod · 0.45
push_backMethod · 0.45
insertMethod · 0.45

Tested by

no test coverage detected