realbasic-plugins
[Top] [All Lists]

Re: REALpathFromFolderItem and XCode

To: REALbasic Plugins <realbasic-plugins at lists dot realsoftware dot com>
Subject: Re: REALpathFromFolderItem and XCode
From: Jonathan Johnson <jonj at realsoftware dot com>
Date: Mon, 12 Feb 2007 12:17:05 -0600
Delivered-to: listarchive at realsoftware dot com
Delivered-to: realbasic-plugins at lists dot realsoftware dot com
References: <B28753C9-40EE-4464-BBE2-AB62BD6608CB at componentx dot com>

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
jonj at realsoftware dot com
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>


<Prev in Thread] Current Thread [Next in Thread>