NAME
finderinfo - display/set Finder information structures
SYNOPSIS
finderinfo [ -bvx ] [ -C creator ] [ -T type ] [ -F flags ]
[ -L [ v ],[ h ]] [ -R [ top ],[ left ],[ bottom ],[ right
]]
[ -S [ v ],[ h ]] [ -V view ] file ... | directory ...
DESCRIPTION
Finderinfo displays current values or changes specified
fields in
the Finder information structures for files (FInfo and
FXInfo) and
directories (DInfo and DXInfo). The structures are shown
below in
NOTES.
The following options can be applied:
-b|-v|-x
Display the Finder information structures in brief (-b),
verbose (-v), or hexadecimal (-x) format; the default is
verbose. If changes are being made to Finder information
structures, no output is generated unless one of these
format
options is also specified.
-C creator
Set the creator (fdCreator) for each named file to creator.
creator may be entered as a character string or a
hexadecimal
value.
-T type
Set the type (fdType) for each named file to type. type may
be entered as a character string or a hexadecimal value.
-F +|-|=flags
Set or clear the specified flags (fdFlags or frFlags) for
each
named file or directory. Flags may be specified with a
hexadecimal mask, or as a sequence of names separated with
commas. The operation prefix character ’+’,
’-’, or ’=’
declares how to apply the flag value. The ’+’
and ’-’ direct
that only the specified flag bit(s) be set or cleared,
respectively, whereas the ’=’ changes the entire
flag word to
the specified value. Flag bits and names are as follows:
0x8000 isAlias
0x4000 isInvisible
0x2000 hasBundle
0x1000 nameLocked
0x0800 isStationery
0x0400 hasCustomIcon
0x0200 Reserved
0x0100 hasBeenInited
0x0080 hasNoINITs
0x0040 isShared
0x0020 requiresSwitchLaunch
0x0010 colorReserved
0x000E color=
0x0001 isOnDesk
Note that the "color="
flag is actually three bits and should
be entered as "color=N", where N is in the range 0
to 7.
-L v,h
Set the location (fdLocation or frLocation) for each named
file or directory to the specified vertical (v) and
horizontal
(h) coordinates. If v or h is unspecified, no change is made
to the corresponding coordinate in each file or
directory.
-R top,left,bottom,right
Set the rectangle (frRect) for each named directory to the
four boundary coordinates top, left, bottom, and right. If
top, left, bottom, or right is unspecified, no change is
made
to the corresponding coordinate in each directory.
-S v,h
Set the scroll position (frScroll) for each named
directory.
-V view
Set the view (frView) for each named directory.
NOTES
Finder information for files and directories is organized
into the
following structures:
typedef unsigned short u_short;
typedef struct Point {
short v;
short h;
} Point;
typedef struct Rect {
short top;
short left;
short bottom;
short right;
} Rect;
typedef struct FInfo {
long fdType; /* the type of the file*/
long fdCreator; /* file’s creator*/
u_short fdFlags; /* flags */
Point fdLocation; /* file’s location in folder */
short fdFldr; /* folder containing file */
} FInfo;
typedef struct FXInfo {
short fdIconID; /* Icon ID */
short fdUnused[3]; /* Reserved 6 bytes */
char fdScript; /* Script flag and code */
char fdXFlags; /* Reserved */
short fdComment; /* Comment ID */
long fdPutAway; /* Home Dir ID */
} FXInfo;
typedef struct DInfo {
Rect frRect; /* folder rect */
u_short frFlags; /* Flags */
Point frLocation; /* folder location */
short frView; /* folder view */
} DInfo;
typedef struct DXInfo {
Point frScroll; /* scroll position */
long frOpenChain; /* DirID chain of open folders */
short frUnused; /* unused but reserved */
short frComment; /* comment */
long frPutAway; /* DirID */
} DXInfo;
SEE ALSO
Consult Apple’s "Inside Macintosh"
documentation series for
detailed discussions about the Finder information
structures.