On Dec 31, 2004, at 2:14 PM, Peter E. Barck wrote:
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
Let me suggest an even simpler version --
f = myFolderItem
While f.Parent <> nil
f = f.Parent
Wend
Volume_Name = f.Name
--------------
Charles Yeomans
_______________________________________________
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>
|