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: How to get non-resolved FSRef from POSIX path



I don't know if this will work or not, but you might try using CFURL to do the translation instead. First call CFURLCreateWithFileSystemPath(), and then call CFURLGetFSRef() on the resulting URL. It might just do the same thing as FSPathMakeRef(), but it's probably worth a shot.

The other function you might try is FSMakeFSRefUnicode(). First, make an FSRef to the parent directory of the symbolic link. Then, use that function and pass in that FSRef and the name of the link file.

On Jan 26, 2004, at 10:00 PM, Calvin Chen wrote:

Hi,

Given a POSIX path of symbolic link, how do I get an unresolved FSRef from
it?

When I pass symbolic link POSIX path to FSPathMakeRef() and then use
FSRefMakePath() I always got the resolved path that recorded in that
symbolic link.

Is there any way I can have the right FSRef point to the real symbolic link
file instead of the solved file/folder?

Best regards,
Calvin
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.


--
Brian Webster
email@hidden
http://homepage.mac.com/bwebster
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

References: 
 >How to get non-resolved FSRef from POSIX path (From: Calvin Chen <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.