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



On 11/16/04 2:53 AM, OL&L Lists didst favor us with:

> Yeah - I reckon I could do that but MoreFilesX's DeleteLevel routine
> says to first check the file manager's name attribute bit to see if
> POSIX names are required - and in this case Gestalt reports that
> POSIX names are required.........
> 
> I can't believe with all the POSIX code in the universe there is not
> some simple standard way of denoting the current user's home folder
> in path names.
> 
> I'll give your approach a try as a last-ditch effort. Thanks.

It's okay if I chuckle here, right? ;-)

Larry

> Michael
> Orbital Launch & Lift, Inc.
> http://www.orbitallaunch.com
> 
> At 1:49 AM -0500 11/16/04, Laurence Harris wrote:
>> On 11/16/04 1:20 AM, OL&L Lists didst favor us with:
>> 
>> Have you considered using the Carbon approach:
>> 
>> FSRef    userFolder;
>> OSErr    err = FSFindFolder( kUserDomain, kCurrentUserFolderType,
>> kDontCreateFolder, &userFolder );
>> 
>> if ( err == noErr )
>> {
>> FSRef   lib;
>> UniChar name[] = { 'l', 'i', 'b' };
>> err = FSMakeFSRefUnicode( &inParentFSRef, 3, name,
>> kTextEncodingDefaultFormat, &lib );
>> 
>> // Delete lib.
>> 
>> }
>> 
>> Larry

 _______________________________________________
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: 
 >Re: Getting the current user dir in Carbon (From: OL&L Lists <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.