• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Trying to create an alias file by using the new NSURL methods available with Mac OS X 10.6 !
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Trying to create an alias file by using the new NSURL methods available with Mac OS X 10.6 !


  • Subject: Re: Trying to create an alias file by using the new NSURL methods available with Mac OS X 10.6 !
  • From: Shawn Erickson <email@hidden>
  • Date: Thu, 14 Jan 2010 09:33:15 -0800

Look at the following functions...

/*** FileSystem path conversion functions ***/

/* Extract the contents of the string as a NULL-terminated 8-bit
string appropriate for passing to POSIX APIs (for example, normalized
for HFS+).  The string is zero-terminated. false will be returned if
the conversion results don't fit into the buffer.  Use
CFStringGetMaximumSizeOfFileSystemRepresentation() if you want to make
sure the buffer is of sufficient length.
*/
CF_EXPORT
Boolean CFStringGetFileSystemRepresentation(CFStringRef string, char
*buffer, CFIndex maxBufLen) AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER;

/* Get the upper bound on the number of bytes required to hold the
file system representation for the string. This result is returned
quickly as a very rough approximation, and could be much larger than
the actual space required. The result includes space for the zero
termination. If you are allocating a buffer for long-term keeping,
it's recommended that you reallocate it smaller (to be the right size)
after calling CFStringGetFileSystemRepresentation().
*/
CF_EXPORT
CFIndex CFStringGetMaximumSizeOfFileSystemRepresentation(CFStringRef
string) AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER;

/* Create a CFString from the specified zero-terminated POSIX file
system representation.  If the conversion fails (possible due to bytes
in the buffer not being a valid sequence of bytes for the appropriate
character encoding), NULL is returned.
*/
CF_EXPORT
CFStringRef CFStringCreateWithFileSystemRepresentation(CFAllocatorRef
alloc, const char *buffer) AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER;
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >Re: Trying to create an alias file by using the new NSURL methods available with Mac OS X 10.6 ! (From: "Sean McBride" <email@hidden>)
 >Re: Trying to create an alias file by using the new NSURL methods available with Mac OS X 10.6 ! (From: rohan a <email@hidden>)
 >Re: Trying to create an alias file by using the new NSURL methods available with Mac OS X 10.6 ! (From: Kyle Sluder <email@hidden>)
 >Re: Trying to create an alias file by using the new NSURL methods available with Mac OS X 10.6 ! (From: rohan a <email@hidden>)

  • Prev by Date: Re: Snapshotting hidden UIViews
  • Next by Date: Re: Snapshotting hidden UIViews
  • Previous by thread: Re: Trying to create an alias file by using the new NSURL methods available with Mac OS X 10.6 !
  • Next by thread: Re: Trying to create an alias file by using the new NSURL methods available with Mac OS X 10.6 !
  • Index(es):
    • Date
    • Thread