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: Too long file paths. Should I really care?




On 14 Sep 2005, at 10:17, Rosyna wrote:

UInt8 filePathChar[4096];

result=FSRefMakePath(&inRef, filePathChar, sizeof(filePathChar));

if (!result)
{
CFURLRef file=CFURLCreateFromFileSystemRepresentation(NULL, filePathChar, strlen(filePathChar), false);




OK, so assuming that we have a CFURL created in such a way, what is the 'correct' way of turning this back into an FSRef (since CFURLGetFSRef won't do it.)

What I really want to be able to do is to round-trip from FSRef <--> CFURL (and vice versa) without caring if the url came from my own code or CFURLCreateFromFSRef.

Obviously it involves walking down the path components, and manually using FSMakeFSRefUnicode, but I am guessing that there are some subtleties that would be overlooked. One of the other recent path- based discussions mentioned problems with SymLinks being resolved 'unintentionally' along paths; I wouldn't want this.


Matt Gough _______________________________________________ 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: Too long file paths. Should I really care? (From: Mike Kluev <email@hidden>)
 >Re: Too long file paths. Should I really care? (From: Rosyna <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.