On Windows we can get volume label by File::getVolumeLabel(), but on Mac we cannot even if the file is on the mounted volume (and its name is shown in Finder.)
How about to make File("/Volumes/Foo/Bar").getVolumeLabel() return “Foo” as below?
const String juce_getVolumeLabel (const String& filenameOnVolume,
int& volumeSerialNumber) throw()
{
// There is no equivalent on Linux
volumeSerialNumber = 0;
return filenameOnVolumes
.fromFirstOccurenceOf(T("/Volumes/"), false, false)
.upToFirstOccurenceOf(T("/"), false, false);
}
