Yes, true. If a '~' exists the home directory could be
concatenated manually by calling FSFindFolder with kUserDomain and
kCurrentUserFolderType then converting that FSRef to a path. Of
course that's probably the kind of work you're trying to avoid. FWIW,
if you're running on Tiger an linking against Carbon then you already
have Foundation loaded automatically. If you can compile your code
with Objective-C++ you can go ahead and use the Cocoa NSString
convenience methods that have been mentioned. Cabrbon and Foundation
wore very well together.
On Sep 29, 2005, at 1:36 PM, Rosyna wrote:
I don't believe that CFURLCreateWithFileSystemPath does shell
expansion (the documentation makes no note of it doing this). glob
does shell exapansion. You can just feed all path strings to it
along with the GLOB_NOESCAPE and GLOB_TILDE flags. It will then
expand any paths starting with ~ to the correct path. This is
similar to NSString's -stringByExpandingTildeInPath method.
Ack, at 9/29/05, Bryan Prusha said:
How about CFURLCreateWithFileSystemPath followed by
CFURLGetFSRef?
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Carbon-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/carbon-dev/email@hidden