MCPcopy Create free account
hub / github.com/bumptop/BumpTop / resolveVolumeName

Method resolveVolumeName

trunk/win/Source/BT_FileSystemManager.cpp:1196–1211  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1194}
1195
1196bool FileSystemManager::resolveVolumeName( QString volume, QString& volumeNameOut )
1197{
1198 if (!exists(volume))
1199 return false;
1200
1201 // derive the drive name from the drive letter
1202 TCHAR volumeName[MAX_PATH];
1203 volumeNameOut = QString("Removable Disk (%1)").arg(volume);
1204 if (GetVolumeInformation((LPCTSTR) volume.utf16(), volumeName, MAX_PATH, NULL, NULL, NULL, NULL, 0))
1205 {
1206 QString tmp = QString::fromUtf16((const ushort *) volumeName);
1207 if (!tmp.isEmpty())
1208 volumeNameOut = tmp;
1209 }
1210 return true;
1211}
1212
1213bool FileSystemManager::isValidVolume( QString volume )
1214{

Callers 2

crossReferenceMethod · 0.80
onDeviceAddedMethod · 0.80

Calls 4

existsFunction · 0.70
QStringFunction · 0.50
argMethod · 0.45
isEmptyMethod · 0.45

Tested by

no test coverage detected