MBS Xojo Developer Conference and Training
Join us from 3rd to 6th May 2017 in Berlin, Germany.

Platforms to show: All Mac Windows Linux Cross-Platform

FAQ.How do I find the root volume for a file?

Answer: Try this function:
Function GetRootVolume(f as FolderItem) as FolderItem
dim root, dum as folderItem
if f <> nil then
root = f // f might be the volume
dum = root.parent
if dum <> nil then
root = dum
end if
loop until dum = nil
return root
end if
End Function

MBS Xojo Plugins