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: Can't convert path ~/... to Fsref



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?

On Sep 29, 2005, at 1:28 PM, Denis @ TheOffice wrote:

Thanks,
But, I fail to see how to integrate that into my code.
I am trying to do a generic function that will handle all possible entry.
Plus I was hopping for something in Carbon.


----- Original Message ----- From: Rosyna To: Denis @ TheOffice ; email@hidden Sent: Thursday, September 29, 2005 4:01 PM Subject: Re: Can't convert path ~/... to Fsref

man 3 glob

http://developer.apple.com/documentation/Darwin/Reference/ManPages/man3/glob.3.html

Ack, at 9/29/05, Denis @ TheOffice said:

I am trying to create/open a file with the origine in posix example "~/Library/Preferences/temp.tiff"

I have made a function to convert based on some example I have found...
It works most of the time but seems to failed with the TILDE(~) current user...
The RetStatus is -43 rectory not found...

--


Sincerely, Rosyna Keller Technical Support/Holy Knight/Always needs a hug

Unsanity: Unsane Tools for Insanely Great People

It's either this, or imagining Phil Schiller in a thong.
_______________________________________________
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: 
 >Can't convert path ~/... to Fsref (From: "Denis @ TheOffice" <email@hidden>)
 >Re: Can't convert path ~/... to Fsref (From: Rosyna <email@hidden>)
 >Re: Can't convert path ~/... to Fsref (From: "Denis @ TheOffice" <email@hidden>)
 >Re: Can't convert path ~/... to Fsref (From: Bryan Prusha <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.