On Feb 12, 2007, at 12:06 PM, Brad Hutchings wrote:

A tip for anyone converting a CodeWarrior Mach-O plugin to XCode... REALpathFromFolderItem returns a path that works with CodeWarrior's fopen, but not XCode's. The path is an old-style Mac path (: separated), not a UNIX path that fopen expects. Am I missing an easier way of opening a file than I use below? Is there something here that should be feature requested? I get the string path, make a new string prepended by "/Volumes/", append the path, and convert ':'s to '/'s.

The approach I generally take is to get the FSRef, create a CFURL pointing to it, then ask for it's file system representation. This will give you a UTF-8 encoded BSD-style path to the file.

HTH,
Jon


--
Jonathan Johnson
[EMAIL PROTECTED]
REAL Software, Inc.

REAL World 2007 Conference
May 9 - 11 in Austin, Texas
<http://www.realsoftware.com/realworld>

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>

Reply via email to