In article <3f359695$>,
"Stephen Fraser" <> wrote:
> 1) The original source code contains a line like this ... int handle =
> open(filename, O_RDONLY);
> which opens a binary file for reading. Everything needed for that is
> defined in fcntl.h, However I can't find a way to close close the file
> once I'm finished with it.
close, which is defined in <unistd.h>. (How'd you find out about open
without hearing about close?)
> 2) How can I search a folder for files matching a specific specification?
> The windows code searches for files using a filespec like "*.TXT", or
> "LEVEL??.DAT".
The BSD way of doing that is with glob, defined in <glob.h>. There are
other ways, too.
> 3) The Windows application registers itself as the application used to
> access .OSF files. So, whenever you'd double click
> on a file with an .OSF extension, it would load up the application and use
> it to process the file. Is it possible to do this on the Mac from within
> the code? (I actually need to change the file registration data during
> run-time).
Extension mapping is controlled via the Info.plist file in your
application's package. There's no standard way to change this at
run-time, particularly if you want the change to take effect
immediately. What are you really trying to accomplish by doing this?
If you can explain that a bit better, we can probably give you a more
appropriate way to solve the problem.


Eric Albert [email][/email]