Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Getting the current user dir in Carbon



That's what I get for spending 13 years in Mac OS 9-only development. :-)

Thanks,

Michael

At 7:32 AM -0800 11/16/04, Eric Schlegel wrote:
On Nov 15, 2004, at 10:20 PM, OL&L Lists wrote:

I've tried:

UInt8 *userslibPathPOSIX = "./lib";

This depends on the current working directory being set correctly. You can't depend on that unless you set it yourself.


and

UInt8 *userslibPathPOSIX = "~/lib";

The ~ character is expanded by the shell, not by the operating system. That is, if you're in tcsh, and you type ~, then tcsh expands that character out to the user's home directory; but passing that character to a posix API will just interpret it literally and won't expand it.


UInt8 *userslibPathPOSIX = "Users/~/lib";

same as above.

UInt8 *userslibPathPOSIX = "$HOME/lib";

Again, the $HOME syntax is shell syntax, and is only expanded by a command shell. It's not expanded by posix APIs.


-eric

_______________________________________________ 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

This email sent to email@hidden
References: 
 >Getting the current user dir in Carbon (From: OL&L Lists <email@hidden>)
 >Re: Getting the current user dir in Carbon (From: Ian Anderson <email@hidden>)
 >Re: Getting the current user dir in Carbon (From: Ian Krieg <email@hidden>)
 >Re: Getting the current user dir in Carbon (From: OL&L Lists <email@hidden>)
 >Re: Getting the current user dir in Carbon (From: Eric Schlegel <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.