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: Frank Condello <developer at chaoticbox dot com>
Date: Mon, 12 Feb 2007 14:41:36 -0500
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> <448F6A54-C230-4E8A-9CE5-946F1E22DFD9 at realsoftware dot com> <5352E5FA-AF9F-4F24-B687-958CF91A5192 at realsoftware dot com> <01C5DE12-AB27-4CF0-9FF3-8D22FD61198A at mac dot com>
On 12-Feb-07, at 1:26 PM, Rob Laveaux wrote:

On 12-feb-2007, at 19:18, Jonathan Johnson wrote:

Although if you're interested in only the path, there's FSRefMakePath as well, which is actually a bit easier. Most of my uses have other uses for the CFURL though :)

If I remember well, the drawback of FSRefMakePath is that it only works on existing files. It does not work on new (non-existing) files. It might not be a problem in this case, it is just a thing to keep in mind :-)

You can check if a file exists by grabing the FSSpec with REALFSSpecFromFolderItem and running that through FSpMakeFSRef. Then use FSCreateFileUnicode to create the file when needed before calling FSRefMakePath. Not sure this is the sanest route, but if anyone wants an example check out the OpenFILEFromFolderItem function in the PNG Utilities source - there's also a read-only version in the ZZip Utilities source:
<http://developer.chaoticbox.com/realbasic_plugins.php>

Frank.
<http://developer.chaoticbox.com/>


_______________________________________________
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>