Re: finding local shares
Re: finding local shares
- Subject: Re: finding local shares
- From: Jason Townsend <email@hidden>
- Date: Tue, 9 Aug 2005 11:24:27 -0700
On Aug 8, 2005, at 6:56 PM, Jordan K. Hubbard wrote:
On Aug 8, 2005, at 4:58 PM, Jason Townsend wrote:
On Aug 4, 2005, at 3:11 PM, Philip D. Wasson wrote:
I'm trying to figure out how to generate a list of local shares
(exports, whatever). More precisely, given the share name someone
would see from a different machine, and knowing the share is from
the machine I'm running on, how do I find the path to that
directory?
I thought I had it figured out, using a combination of property
lists and NetInfo (./config/SharePoints, ./users/<username>/
sharedDir), but now I find that in 10.3 and later I can't use
NetInfo. Is that information now accessed via Open Directory? I
don't suppose anyone has done something like this already and
could point me at some sample code? (I guess anything that reads
something that is in NetInfo the new way would be extremely
helpful.)
TIA
Philip,
There are two options... the most expedient one would be to grab
the headers for the NetInfo APIs from the appropriate Darwin
project and just continue using them. This can be done by grabbing
the appropriate version of the Libinfo code from http://
darwinsource.opendarwin.org or http://www.opensource.apple.com/
darwinsource/.
This might be expedient, but it's not without peril. :-(
The netinfo headers were removed because the APIs are now fully
deprecated and will go away completely in future releases of the
OS. For now, it's may be a reasonable stop-gap solution, just be
aware that it's going to break at some point.
Right... in my haste to respond I didn't fully explain the caveats
about this option.
-Jason
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden