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>

Reply via email to