[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Dcntl/Fcntl opcodes for HFS access



These opcodes are used in

1) MagiCMac (when accessing files on a HFS volume)
2) SPIN (when accessing a CDROM with HFS or ISO9660 with Mac extensions)

They are already supported in some of my tools (cat, du, file...), see
http://www.muenster.de/~reschke/soft_e.html.

--

typedef struct _MacFinderInfo {
    long fdType;        /*the type of the file*/
    long fdCreator;     /*file's creator*/
    unsigned short fdFlags; /*flags ex. hasbundle,invisible,locked,
etc.*/
    short fdLocation1;  /*file's location in folder*/
    short fdLocation2;  /* rest of location */
    short fdFldr;       /*folder containing file*/
} MacFinderInfo;

#define FMACOPENRES             (('F' << 8) | 72)
/* Fcntl: switches to the resource fork of an opened file; returns
   EFILFN if no resoure fork exists, E_OK otherwise */


#define FMACGETTYCR             (('F' << 8) | 73)
#define FMACSETTYCR             (('F' << 8) | 74)
/* Dcntl/fcntl: gets/sets Mac finder information */