"Type" of A/UX files.

Earle R. Horton earleh at eleazar.dartmouth.edu
Mon Apr 17 13:41:20 AEST 1989


     I am not using A/UX for development, but I have occasion to run
programs developed for the Macintosh on an A/UX system.  After some
experience in this area, a couple of questions come to mind regarding
the behavior of native Macintosh programs under A/UX.

     If I "Create" a file on the A/UX system, I get a file with the
first 128 bytes containing Macintosh file information (creator, type,
etc.)  I am writing data-fork-only files.  On the other hand, if I
OVERWRITE an existing A/UX file, then I do NOT get the Macintosh
information written out.  I just modify the A/UX file contents.  This
program can write and modify data in a format which is directly usable
by UNIX programs, doing any carriage return to linefeed conversion
according to user-configurable settings.  The ability to write out
files in a user-selected format is made somewhat less useful by the
presence of the "extra" 128 bytes when my program is the original
creator of the file, and the absence thereof when it is not.

     I have two questions regarding this file creation business:

     Is there any way I can make sure that the actual contents of a
data file which I create contain only data?  I want to do this in an
operating system independent fashion, using only Macintosh file system
calls.

     Failing a means of reliably producing pure data files, can I be
sure that if I modify a previously existing file, that the modified
file will not contain data which I have not explicitly put there?
This seems to be the present behavior under A/UX, but I was wondering
if Apple had meant it to be, and are they intending to keep it that
way?

Earle R. Horton

Graduate Student.  Programmer.  God to my cats.



More information about the Comp.unix.aux mailing list