realbasic-plugins
[Top] [All Lists]

Dealing with files

To: REALbasic Plugins <realbasic-plugins at lists dot realsoftware dot com>
Subject: Dealing with files
From: "Theodore H. Smith" <delete at elfdata dot com>
Date: Sat, 24 Dec 2005 00:17:36 +0000
Delivered-to: realbasic-plugins at lists dot realsoftware dot com

I haven't written any code that deals with files before, from within a plugin.

I've got some code using fopen, fwrite, etc, that I'd like to port to an RB plugin.

One thing though, it uses current directories quite a lot. I'm not sure that Carbon supports current directories? I'm also not sure that CodeWarrior's fopen and fwrite is very good, I had some problems with it before not accepting shell paths :(

What's a good x-platform way of dealing with files?

I'm considering changing all my fopen functions, to RBfopen, RBfXXX. And then write a bunch of RBfopen type functions, which will take the standard Unix parameters, although maybe an RB folderitem in place of a FILE*.

Is this a good idea? I'd rather keep fopen but I'm not sure that CodeWarrior's fopen is good or that Mac Carbon API even has a current directory, so maybe it's better to do things with RB folderitems...

If so, I guess I'd be making a lot of use of REALLoadObjectMethod, right? I'd need to write a lot of RB-style code, but in C using REALLoadObjectMethod. *sigh*. It won't be easy pretty or fun, unfortunately.


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

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>


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