Find if mounted volume is Local or Network?
Find if mounted volume is Local or Network?
- Subject: Find if mounted volume is Local or Network?
- From: Jerry Krinock <email@hidden>
- Date: Fri, 6 Nov 2009 05:12:52 -0800
Given a path such as
"/Volumes/SomeVolume/Hello.txt"
How can I determine whether or not SomeVolume is a Local or Network
mount?
I have two kludgey solutions which utilize the FSRef of the given path:
Kludgey solution A: FSGetVolumeMountInfoSize() and
FSGetVolumeMountInfo() return a -36 ioErr if the path is Local mount
but return 0 noErr if it is Network. (Why?? -- Mac OS 10.5.8)
Kludgey solution B: FSCopyDiskIDForVolume() will return a "real" disk
ID such as "disk0s3" or "disk1s2" if the path is Local but will return
"Volumes/VolumeName" when the path is Network.
Solution B makes more sense, but is there a documented and reliable
method?
Thanks,
Jerry Krinock
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Macnetworkprog mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden