I believe that if the Parent property is nil, the folderitem is a volume.
On Dec 30, 2004, at 8:40 PM, Dave wrote:
How would I check if a folderitem is a volume?
--
Geoff Perlman
President and CEO
REAL Software, Inc.
I have been using the following simple loop to get a Volume Name.
Here "myFolderItem" is the FolderItem where you want to find its root
Volume. At the end f1 is the Root Volume FolderItem, which for your
home folder is equivalent Volume(0)
Dim f1, f2 As FolderItem
f1 = myFolderItem
Do
f2 = f1.Parent
if f2 = Nil Then
Volume_Name = f1.Name
exit
end if
f1 = f2
Loop
I hope this helps. Have a wonderful New Year.
--
Cheers,
Peter
TI PowerBook G4, 1.GHz, 1GB RAM, OSX 10.3.4, RB 5.5.4
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>
|