<s>
The	O
resource	B-Operating_System
fork	I-Operating_System
is	O
a	O
fork	B-Application
or	I-Application
section	I-Application
of	O
a	O
file	B-Operating_System
on	O
Apple	O
's	O
classic	B-Application
Mac	I-Application
OS	I-Application
operating	B-General_Concept
system	I-General_Concept
,	O
which	O
was	O
also	O
carried	O
over	O
to	O
the	O
modern	O
macOS	B-Application
for	O
compatibility	O
,	O
used	O
to	O
store	O
structured	O
data	O
along	O
with	O
the	O
unstructured	O
data	O
stored	O
within	O
the	O
data	B-Operating_System
fork	I-Operating_System
.	O
</s>
<s>
A	O
resource	B-Operating_System
fork	I-Operating_System
stores	O
information	O
in	O
a	O
specific	O
form	O
,	O
containing	O
details	O
such	O
as	O
icon	O
bitmaps	O
,	O
the	O
shapes	O
of	O
windows	O
,	O
definitions	O
of	O
menus	O
and	O
their	O
contents	O
,	O
and	O
application	O
code	O
(	O
machine	B-Language
code	I-Language
)	O
.	O
</s>
<s>
For	O
example	O
,	O
a	O
word	O
processing	O
file	B-Operating_System
might	O
store	O
its	O
text	O
in	O
the	O
data	B-Operating_System
fork	I-Operating_System
,	O
while	O
storing	O
any	O
embedded	O
images	O
in	O
the	O
same	O
file	B-Operating_System
's	O
resource	B-Operating_System
fork	I-Operating_System
.	O
</s>
<s>
The	O
resource	B-Operating_System
fork	I-Operating_System
is	O
used	O
mostly	O
by	O
executables	B-Application
,	O
but	O
every	O
file	B-Operating_System
is	O
able	O
to	O
have	O
a	O
resource	B-Operating_System
fork	I-Operating_System
.	O
</s>
<s>
Originally	O
conceived	O
and	O
implemented	O
by	O
programmer	O
Bruce	O
Horn	O
,	O
the	O
resource	B-Operating_System
fork	I-Operating_System
was	O
used	O
for	O
three	O
purposes	O
with	O
Macintosh	B-Application
file	I-Application
system	I-Application
:	O
</s>
<s>
This	O
software	O
variant	O
of	O
virtual	B-Architecture
memory	I-Architecture
helped	O
Apple	O
to	O
reduce	O
memory	O
requirements	O
from	O
1	O
MB	O
in	O
the	O
Apple	B-Device
Lisa	I-Device
to	O
128KB	O
in	O
Macintosh	B-Device
.	O
</s>
<s>
Because	O
all	O
the	O
pictures	O
and	O
text	O
were	O
stored	O
separately	O
in	O
a	O
resource	B-Operating_System
fork	I-Operating_System
,	O
it	O
could	O
be	O
used	O
to	O
allow	O
a	O
non-programmer	O
to	O
translate	O
an	O
application	O
for	O
a	O
foreign	O
market	O
,	O
a	O
process	O
called	O
internationalization	B-General_Concept
and	I-General_Concept
localization	I-General_Concept
.	O
</s>
<s>
It	O
could	O
be	O
used	O
to	O
distribute	O
nearly	O
all	O
of	O
the	O
components	O
of	O
an	O
application	O
in	O
a	O
single	O
file	B-Operating_System
,	O
reducing	O
clutter	O
and	O
simplifying	O
application	O
installation	B-Application
and	O
removal	O
.	O
</s>
<s>
The	O
resource	B-Operating_System
fork	I-Operating_System
is	O
implemented	O
in	O
all	O
of	O
the	O
file	B-Application
systems	I-Application
used	O
for	O
system	O
drives	O
on	O
the	O
Macintosh	B-Device
(	O
MFS	B-Application
,	O
HFS	B-Application
and	O
HFS	B-Application
Plus	I-Application
)	O
.	O
</s>
<s>
The	O
presence	O
of	O
a	O
resource	B-Operating_System
fork	I-Operating_System
makes	O
it	O
easy	O
to	O
store	O
a	O
variety	O
of	O
additional	O
information	O
,	O
such	O
as	O
allowing	O
the	O
system	O
to	O
display	O
the	O
correct	O
icon	O
for	O
a	O
file	B-Operating_System
and	O
open	O
it	O
without	O
the	O
need	O
for	O
a	O
file	B-Operating_System
extension	O
in	O
the	O
file	B-Operating_System
name	O
.	O
</s>
<s>
While	O
access	O
to	O
the	O
data	B-Operating_System
fork	I-Operating_System
works	O
like	O
file	B-Application
access	I-Application
on	O
any	O
other	O
operating	B-General_Concept
system	I-General_Concept
pick	O
a	O
file	B-Operating_System
,	O
pick	O
a	O
byte	O
offset	O
,	O
read	O
some	O
data	O
access	O
to	O
the	O
resource	B-Operating_System
fork	I-Operating_System
works	O
more	O
like	O
extracting	O
structured	O
records	O
from	O
a	O
database	O
.	O
</s>
<s>
(	O
Microsoft	B-Application
Windows	I-Application
also	O
has	O
a	O
concept	O
of	O
"	O
resources	O
"	O
,	O
but	O
these	O
are	O
completely	O
unrelated	O
to	O
resources	O
in	O
Mac	B-Application
OS	I-Application
.	O
)	O
</s>
<s>
The	O
resource	B-Operating_System
fork	I-Operating_System
is	O
sometimes	O
used	O
to	O
store	O
the	O
metadata	O
of	O
a	O
file	B-Operating_System
,	O
although	O
it	O
can	O
also	O
be	O
used	O
for	O
storing	O
the	O
actual	O
data	O
,	O
as	O
was	O
the	O
case	O
with	O
font	O
files	O
in	O
the	O
classic	O
Mac	B-Device
operating	B-General_Concept
systems	I-General_Concept
.	O
</s>
<s>
Note	O
that	O
the	O
Macintosh	B-Application
file	I-Application
systems	I-Application
also	O
have	O
a	O
separate	O
area	O
for	O
metadata	O
distinct	O
from	O
either	O
the	O
data	O
or	O
resource	B-Operating_System
fork	I-Operating_System
.	O
</s>
<s>
Being	O
part	O
of	O
the	O
catalogue	O
entry	O
for	O
the	O
file	B-Operating_System
,	O
it	O
is	O
much	O
faster	O
to	O
access	O
this	O
.	O
</s>
<s>
However	O
,	O
the	O
amount	O
of	O
data	O
stored	O
here	O
is	O
minimal	O
,	O
being	O
just	O
the	O
creation	O
and	O
modification	O
timestamps	O
,	O
the	O
file	B-Operating_System
type	O
and	O
creator	B-Operating_System
codes	I-Operating_System
,	O
fork	B-Application
lengths	O
,	O
and	O
the	O
file	B-Operating_System
name	O
.	O
</s>
<s>
Some	O
files	O
have	O
only	O
a	O
resource	B-Operating_System
fork	I-Operating_System
.	O
</s>
<s>
Classic	O
68k	B-Device
applications	O
are	O
one	O
example	O
,	O
where	O
even	O
the	O
executable	B-Application
code	I-Application
is	O
contained	O
in	O
resources	O
of	O
type	O
'	O
CODE	O
 '	O
.	O
</s>
<s>
Later	O
PowerPC	B-Architecture
binaries	O
store	O
the	O
executable	B-Application
code	I-Application
in	O
the	O
data	B-Operating_System
fork	I-Operating_System
.	O
</s>
<s>
As	O
resource	B-Operating_System
forks	I-Operating_System
are	O
supported	O
only	O
on	O
the	O
file	B-Application
systems	I-Application
HFS	B-Application
,	O
HFS	B-Application
Plus	I-Application
,	O
and	O
APFS	O
,	O
they	O
cannot	O
be	O
used	O
on	O
operating	B-General_Concept
systems	I-General_Concept
which	O
use	O
other	O
file	B-Application
systems	I-Application
.	O
</s>
<s>
At	O
present	O
,	O
HFS	B-Application
is	O
supported	O
only	O
by	O
the	O
Macintosh	B-Device
operating	B-General_Concept
system	I-General_Concept
,	O
which	O
means	O
that	O
only	O
machines	O
running	O
Mac	B-Application
OS	I-Application
can	O
use	O
resource	B-Operating_System
forks	I-Operating_System
.	O
</s>
<s>
Even	O
in	O
a	O
Mac	B-Application
OS	I-Application
system	O
,	O
resource	B-Operating_System
forks	I-Operating_System
cannot	O
be	O
used	O
if	O
the	O
Unix	B-Operating_System
File	I-Operating_System
System	I-Operating_System
has	O
been	O
installed	B-Application
.	O
</s>
<s>
In	O
the	O
HFS	B-Application
Plus	I-Application
file	B-Application
system	I-Application
,	O
settings	O
can	O
be	O
made	O
to	O
allow	O
other	O
forks	B-Application
in	O
addition	O
to	O
the	O
data	O
and	O
resource	B-Operating_System
forks	I-Operating_System
,	O
to	O
create	O
a	O
"	O
multi-fork	O
"	O
application	O
.	O
</s>
<s>
However	O
,	O
as	O
forks	B-Application
can	O
make	O
it	O
difficult	O
to	O
exchange	O
files	O
with	O
other	O
operating	B-General_Concept
systems	I-General_Concept
,	O
this	O
feature	O
is	O
not	O
in	O
common	O
use	O
.	O
</s>
<s>
Even	O
in	O
macOS	B-Application
,	O
resource	B-Operating_System
forks	I-Operating_System
are	O
seldom	O
used	O
anymore	O
.	O
</s>
<s>
Currently	O
,	O
macOS	B-Application
supports	O
resource	B-Operating_System
forks	I-Operating_System
on	O
Windows	O
SMB	B-Operating_System
shares	O
by	O
creating	O
a	O
hidden	O
file	B-Operating_System
with	O
the	O
characters	O
"	O
._	O
"	O
added	O
at	O
the	O
beginning	O
of	O
the	O
file	B-Operating_System
name	O
,	O
in	O
the	O
same	O
directory	O
as	O
the	O
data	B-Operating_System
fork	I-Operating_System
file	B-Operating_System
.	O
</s>
<s>
Each	O
resource	O
has	O
an	O
OSType	B-Application
identifier	O
(	O
a	O
four	O
byte	O
value	O
)	O
and	O
an	O
ID	O
(	O
a	O
signed	B-Algorithm
16-bit	O
word	O
)	O
,	O
as	O
well	O
as	O
an	O
optional	O
name	O
.	O
</s>
<s>
There	O
are	O
standardized	O
resource	O
types	O
for	O
dialog	O
boxes	O
( 	O
 '	O
DITL	O
)	O
,	O
images	O
( 	O
 '	O
PICT	B-Language
 '	O
)	O
,	O
sounds	O
( 	O
 '	O
snd	O
'	O
)	O
and	O
even	O
for	O
executable	B-Application
binaries	I-Application
( 	O
 '	O
CODE	O
 '	O
)	O
which	O
,	O
until	O
the	O
advent	O
of	O
the	O
PowerPC	B-Architecture
processor	I-Architecture
,	O
were	O
without	O
exception	O
stored	O
in	O
the	O
resource	B-Operating_System
fork	I-Operating_System
.	O
</s>
<s>
This	O
arrangement	O
enabled	O
users	O
to	O
easily	O
customize	O
not	O
only	O
individual	O
applications	O
but	O
also	O
the	O
operating	B-General_Concept
system	I-General_Concept
itself	O
,	O
using	O
tools	O
such	O
as	O
ResEdit	B-Operating_System
to	O
modify	O
the	O
resources	O
of	O
an	O
application	O
file	B-Operating_System
or	O
any	O
of	O
the	O
system	O
files	O
.	O
</s>
<s>
Within	O
an	O
application	O
or	O
other	O
code	O
,	O
resources	O
can	O
be	O
loaded	O
simply	O
using	O
a	O
combination	O
of	O
their	O
type	O
,	O
ID	O
or	O
name	O
,	O
without	O
regard	O
to	O
how	O
and	O
where	O
they	O
are	O
stored	O
in	O
the	O
resource	B-Operating_System
fork	I-Operating_System
.	O
</s>
<s>
In	O
addition	O
to	O
abstracting	O
the	O
details	O
of	O
the	O
data	O
storage	O
from	O
the	O
data	O
itself	O
,	O
the	O
Resource	O
Manager	O
also	O
arranges	O
sets	O
of	O
open	O
resource	B-Operating_System
forks	I-Operating_System
into	O
a	O
stack	O
,	O
with	O
the	O
most	O
recently	O
opened	O
file	B-Operating_System
on	O
top	O
.	O
</s>
<s>
When	O
trying	O
to	O
load	O
a	O
resource	O
,	O
it	O
will	O
look	O
in	O
the	O
top	O
of	O
the	O
stack	O
first	O
,	O
(	O
perhaps	O
the	O
current	O
document	O
's	O
resource	B-Operating_System
fork	I-Operating_System
)	O
,	O
then	O
the	O
next	O
one	O
down	O
(	O
the	O
application	O
's	O
resource	B-Operating_System
fork	I-Operating_System
)	O
,	O
then	O
the	O
next	O
one	O
(	O
system	O
resource	B-Operating_System
forks	I-Operating_System
)	O
.	O
</s>
<s>
It	O
also	O
allows	O
an	O
application	O
to	O
load	O
resources	O
from	O
the	O
system	O
using	O
the	O
same	O
API	B-Application
as	O
any	O
other	O
resource	O
,	O
without	O
regard	O
to	O
where	O
or	O
how	O
that	O
resource	O
is	O
stored	O
to	O
the	O
application	O
,	O
all	O
resources	O
are	O
equally	O
available	O
and	O
easy	O
to	O
use	O
.	O
</s>
<s>
Resource	O
Manager	O
APIs	B-Application
allow	O
the	O
programmer	O
to	O
manipulate	O
the	O
stack	O
and	O
modify	O
the	O
search	O
behaviour	O
.	O
</s>
<s>
As	O
the	O
resource	B-Operating_System
fork	I-Operating_System
can	O
be	O
edited	O
with	O
a	O
resource	O
editor	O
such	O
as	O
ResEdit	B-Operating_System
,	O
it	O
can	O
be	O
used	O
to	O
localize	B-General_Concept
and	O
customize	O
software	O
.	O
</s>
<s>
In	O
macOS	B-Application
,	O
it	O
is	O
possible	O
to	O
use	O
resources	O
when	O
developing	O
an	O
application	O
.	O
</s>
<s>
However	O
,	O
if	O
the	O
application	O
may	O
need	O
to	O
be	O
used	O
in	O
UFS	B-Operating_System
,	O
it	O
is	O
also	O
possible	O
to	O
configure	O
it	O
so	O
that	O
the	O
entire	O
resource	B-Operating_System
fork	I-Operating_System
is	O
moved	O
to	O
the	O
data	B-Operating_System
fork	I-Operating_System
,	O
using	O
the	O
Raw	O
Resource	O
File	B-Operating_System
setting	O
.	O
</s>
<s>
The	O
integrated	B-Application
development	I-Application
environments	I-Application
distributed	O
for	O
free	O
by	O
Apple	O
Inc.	O
,	O
which	O
include	O
MPW	B-Operating_System
and	O
Apple	B-Operating_System
Developer	I-Operating_System
's	I-Operating_System
Tools	I-Operating_System
,	O
include	O
a	O
compiler	B-Language
called	O
Rez	O
.	O
</s>
<s>
This	O
uses	O
a	O
dedicated	O
language	O
,	O
also	O
called	O
Rez	O
,	O
which	O
can	O
be	O
used	O
to	O
create	O
a	O
resource	B-Operating_System
fork	I-Operating_System
by	O
compiling	B-Language
source	O
code	O
.	O
</s>
<s>
A	O
decompiler	O
,	O
DeRez	O
,	O
which	O
can	O
be	O
used	O
to	O
change	O
a	O
resource	B-Operating_System
fork	I-Operating_System
back	O
into	O
Rez	O
code	O
is	O
also	O
included	O
.	O
</s>
<s>
In	O
the	O
structure	O
of	O
the	O
resource	B-Operating_System
fork	I-Operating_System
,	O
there	O
is	O
a	O
piece	O
of	O
data	O
called	O
a	O
"	O
resource	O
map	O
"	O
which	O
stores	O
the	O
positions	O
of	O
resource	O
data	O
items	O
.	O
</s>
<s>
This	O
can	O
be	O
used	O
to	O
allow	O
random	B-General_Concept
access	I-General_Concept
to	O
resource	O
data	O
based	O
on	O
the	O
defined	O
IDs	O
and	O
names	O
.	O
</s>
<s>
The	O
resource	B-Operating_System
fork	I-Operating_System
can	O
be	O
thought	O
of	O
as	O
consisting	O
of	O
essentially	O
two	O
objects	O
,	O
the	O
resource	O
map	O
and	O
the	O
resource	O
data	O
itself	O
,	O
but	O
in	O
fact	O
each	O
data	O
type	O
is	O
a	O
hierarchical	O
structure	O
which	O
stores	O
multiple	O
items	O
of	O
data	O
.	O
</s>
<s>
In	O
macOS	B-Application
,	O
forks	B-Application
are	O
named	O
namedfork	O
..	O
,	O
e.g.	O
,	O
the	O
resource	B-Operating_System
fork	I-Operating_System
of	O
the	O
file	B-Operating_System
IMG_0593.jpg	O
is	O
namedfork	O
..	O
.	O
</s>
<s>
The	O
ls	O
command	O
supports	O
a	O
-l	O
@	O
option	O
which	O
lists	O
a	O
file	B-Operating_System
's	O
forks	B-Application
.	O
</s>
<s>
Resource	B-Operating_System
forks	I-Operating_System
appear	O
as	O
the	O
extended	B-Application
attribute	I-Application
com.apple.ResourceFork	O
.	O
</s>
<s>
Previously	O
resource	B-Operating_System
forks	I-Operating_System
were	O
accessed	O
via	O
the	O
'	O
Resource	O
Manager	O
 '	O
API	B-Application
.	O
</s>
<s>
This	O
API	B-Application
is	O
now	O
deprecated	O
.	O
</s>
<s>
Under	O
the	O
deprecated	O
API	B-Application
:	O
</s>
<s>
When	O
a	O
resource	B-Operating_System
fork	I-Operating_System
is	O
accessed	O
,	O
data	O
including	O
the	O
start	O
position	O
and	O
length	O
of	O
the	O
resource	O
data	O
and	O
resource	O
map	O
is	O
read	O
in	O
from	O
the	O
header	O
.	O
</s>
<s>
File	B-Application
Manager	I-Application
APIs	B-Application
such	O
as	O
PBOpenRF( )	O
also	O
allowed	O
access	O
to	O
the	O
raw	O
resource	B-Operating_System
fork	I-Operating_System
;	O
however	O
,	O
they	O
should	O
be	O
used	O
only	O
for	O
applications	O
such	O
as	O
copying	O
a	O
file	B-Operating_System
Apple	O
strongly	O
warns	O
against	O
using	O
the	O
resource	B-Operating_System
fork	I-Operating_System
as	O
a	O
"	O
second	O
data	O
fork.	O
"	O
</s>
<s>
From	O
the	O
POSIX	O
interface	O
,	O
the	O
resource	B-Operating_System
fork	I-Operating_System
could	O
be	O
accessed	O
as	O
namedfork	O
..	O
or	O
as	O
filename/rsrc	O
;	O
the	O
shorter	O
form	O
was	O
deprecated	O
in	O
Mac	B-Application
OS	I-Application
X	I-Application
v10.4	I-Application
and	O
removed	O
completely	O
in	O
Mac	B-Application
OS	I-Application
X	I-Application
v10.7	I-Application
.	O
</s>
<s>
The	O
smallest	O
elements	O
making	O
up	O
a	O
resource	B-Operating_System
fork	I-Operating_System
are	O
called	O
data	O
types	O
.	O
</s>
<s>
After	O
a	O
resource	B-Operating_System
fork	I-Operating_System
is	O
accessed	O
,	O
its	O
contents	O
can	O
be	O
found	O
by	O
reading	O
it	O
in	O
as	O
appropriate	O
for	O
the	O
data	O
types	O
defined	O
in	O
advance	O
.	O
</s>
<s>
Using	O
this	O
method	O
increases	O
the	O
visibility	O
of	O
the	O
data	O
when	O
viewed	O
with	O
a	O
program	O
such	O
as	O
ResEdit	B-Operating_System
,	O
making	O
later	O
editing	O
simpler	O
.	O
</s>
<s>
As	O
the	O
Macintosh	B-Device
platform	O
originated	O
with	O
Motorola-based	O
processors	O
(	O
68k	B-Device
and	O
PPC	O
)	O
,	O
the	O
data	O
is	O
serialized	O
to	O
disk	O
in	O
big-endian	O
format	O
.	O
</s>
<s>
CSTR	O
C	B-Language
stringRepresents	O
a	O
string	O
of	O
the	O
form	O
used	O
in	O
the	O
C	B-Language
programming	I-Language
language	I-Language
:	O
a	O
null-terminated	B-Data_Structure
string	I-Data_Structure
of	O
bytes	O
.	O
</s>
<s>
It	O
is	O
used	O
,	O
among	O
other	O
things	O
,	O
to	O
represent	O
integers	O
greater	O
than	O
2.1	O
billion	O
,	O
such	O
as	O
unsigned	B-Algorithm
long	O
values	O
in	O
C	B-Language
.	O
PSTR	O
Pascal	O
stringRepresents	O
a	O
Pascal	O
string	O
,	O
with	O
the	O
first	O
byte	O
giving	O
the	O
length	O
of	O
the	O
string	O
.	O
</s>
<s>
TNAM	O
type	O
nameA	O
string	O
representing	O
a	O
value	O
such	O
as	O
a	O
creator	B-Operating_System
code	I-Operating_System
,	O
which	O
is	O
always	O
4	O
bytes	O
long	O
.	O
</s>
<s>
The	O
type	O
codes	O
below	O
,	O
like	O
the	O
above	O
datatypes	O
,	O
are	O
used	O
as	O
type	O
identifiers	O
for	O
more	O
than	O
resource	B-Operating_System
forks	I-Operating_System
themselves	O
:	O
they	O
are	O
used	O
to	O
identify	O
file	B-Operating_System
themselves	O
,	O
to	O
describe	O
data	O
in	O
the	O
clipboard	O
,	O
and	O
much	O
more	O
.	O
</s>
<s>
Name	O
of	O
resource	O
type	O
actual	O
name	O
Description	O
alis	O
aliasStores	O
an	O
alias	O
to	O
another	O
file	B-Operating_System
,	O
in	O
a	O
resource	B-Operating_System
fork	I-Operating_System
of	O
a	O
file	B-Operating_System
whose	O
"	O
alias	O
"	O
attribute	O
bit	O
is	O
set	O
ALRT	O
alertDefines	O
the	O
shape	O
of	O
an	O
application	O
alert	O
box	O
APPL	O
applicationStores	O
application	O
information	O
BNDL	O
bundleDefines	O
data	O
such	O
as	O
a	O
file	B-Operating_System
type	O
icon	O
used	O
in	O
an	O
application	O
cicn	O
color	O
iconDefines	O
a	O
color	O
icon	O
used	O
in	O
data	O
clut	O
color	O
look-up	O
tableDefines	O
a	O
color	O
palette	O
used	O
in	O
data	O
CNTL	O
controlDefines	O
the	O
details	O
of	O
a	O
component	O
positioned	O
in	O
a	O
window	O
CODE	O
code	O
resourceStores	O
the	O
machine	B-Language
code	I-Language
for	O
the	O
program	O
CURS	O
cursorDefines	O
the	O
shape	O
of	O
a	O
monochrome	O
cursor	O
(	O
8	O
×	O
8	O
bit	O
square	O
)	O
DITL	O
dialog	O
item	O
listDefines	O
a	O
component	O
of	O
a	O
window	O
DLOG	O
dialogDefines	O
the	O
shape	O
of	O
a	O
dialog	O
box	O
for	O
an	O
application	O
FREF	O
file	B-Operating_System
referenceDefines	O
a	O
file	B-Operating_System
type	O
handled	O
by	O
an	O
application	O
hfdr	O
icon	O
balloon	O
helpDefines	O
the	O
contents	O
and	O
shape	O
of	O
the	O
balloon	O
help	O
displayed	O
when	O
the	O
cursor	O
hovers	O
over	O
the	O
file	B-Operating_System
in	O
the	O
Finder	O
icl8	O
8-bit	O
icon	O
listDefines	O
an	O
icon	O
displayed	O
in	O
the	O
Finder	O
icns	O
32-bit	O
icon	O
listDefines	O
an	O
icon	O
displayed	O
in	O
the	O
Finder	O
ICON	O
iconDefines	O
a	O
monochrome	O
item	O
used	O
in	O
data	O
kind	O
file	B-Operating_System
descriptionDefines	O
a	O
description	O
of	O
a	O
file	B-Operating_System
type	O
MBAR	O
menu	O
barDefines	O
a	O
menu	O
and	O
menu	O
bar	O
for	O
an	O
application	O
MDEF	O
menu	O
definitionDefines	O
a	O
menu	O
for	O
an	O
application	O
.	O
</s>
<s>
MENU	O
menuDefines	O
the	O
menu	O
items	O
in	O
an	O
application	O
MooV	O
movieStores	O
a	O
QuickTime	O
movie	O
open	O
openDefines	O
a	O
file	B-Operating_System
type	O
which	O
the	O
application	O
can	O
open	O
PICT	B-Language
pictureStores	O
a	O
PICT	B-Language
image	O
contained	O
in	O
the	O
file	B-Operating_System
PREF	O
preferenceStores	O
the	O
environment	O
settings	O
for	O
an	O
application	O
snd	O
soundStores	O
a	O
sound	O
used	O
in	O
the	O
file	B-Operating_System
STR	O
stringStores	O
a	O
string	O
or	O
hexadecimal	O
data	O
used	O
in	O
the	O
file	B-Operating_System
STR#	O
string	O
listStores	O
multiple	O
strings	O
used	O
in	O
the	O
file	B-Operating_System
styl	O
styleDefines	O
style	O
information	O
,	O
such	O
as	O
the	O
font	O
,	O
color	O
and	O
size	O
of	O
text	O
TEXT	O
textStores	O
text	O
TMPL	O
templateDefines	O
the	O
format	O
for	O
the	O
resource	O
data	O
vers	O
versionDefines	O
the	O
version	O
or	O
region	O
of	O
use	O
of	O
the	O
file	B-Operating_System
WDEF	O
window	O
definitionDefines	O
a	O
window	O
for	O
the	O
application	O
.	O
</s>
<s>
ResEdit	B-Operating_System
Distributed	O
free	O
of	O
charge	O
by	O
Apple	O
.	O
</s>
<s>
Does	O
not	O
run	O
on	O
modern	O
macOS	B-Application
.	O
</s>
<s>
Resorcerer	O
Expensive	O
,	O
but	O
popular	O
,	O
as	O
it	O
can	O
be	O
used	O
for	O
visual	O
editing	O
of	O
many	O
more	O
types	O
of	O
data	O
than	O
ResEdit	B-Operating_System
.	O
</s>
<s>
HexEdit	O
A	O
binary	O
editor	O
,	O
which	O
in	O
fact	O
is	O
normally	O
used	O
more	O
for	O
editing	O
the	O
data	B-Operating_System
fork	I-Operating_System
rather	O
than	O
the	O
resource	B-Operating_System
fork	I-Operating_System
.	O
</s>
<s>
ResKnife	B-Language
Open-source	O
editor	O
for	O
Mac	B-Device
OS	I-Device
X	I-Device
;	O
no	O
longer	O
maintained	O
.	O
</s>
<s>
Rezycle	O
A	O
macOS	B-Application
tool	O
that	O
extracts	O
resources	O
from	O
a	O
resource	B-Operating_System
fork	I-Operating_System
into	O
separate	O
binary	O
files	O
while	O
converting	O
many	O
types	O
into	O
formats	O
suitable	O
for	O
modern	O
development	O
.	O
</s>
<s>
resource_dasm	O
An	O
open-source	O
resource	O
extractor	O
for	O
macOS	B-Application
,	O
also	O
capable	O
of	O
converting	O
many	O
resources	O
into	O
modern	O
formats	O
.	O
</s>
<s>
ResForge	O
resource	O
editor	O
for	O
macOS	B-Application
,	O
capable	O
of	O
editing	O
classic	O
resource	B-Operating_System
fork	I-Operating_System
files	O
and	O
related	O
formats	O
.	O
</s>
<s>
The	O
complexity	O
of	O
programming	O
with	O
resource	B-Operating_System
forks	I-Operating_System
has	O
led	O
to	O
compatibility	O
problems	O
when	O
accessing	O
other	O
file	B-Application
systems	I-Application
via	O
file	B-Operating_System
sharing	O
protocols	O
such	O
as	O
AFP	B-Protocol
,	O
SMB	B-Operating_System
,	O
NFS	B-Protocol
and	O
FTP	B-Protocol
,	O
when	O
storing	O
to	O
non-HFS	O
volumes	O
,	O
or	O
when	O
transmitting	O
files	O
to	O
other	O
systems	O
in	O
other	O
ways	O
(	O
such	O
as	O
via	O
email	O
)	O
.	O
</s>
<s>
The	O
AFP	B-Protocol
protocol	O
natively	O
supports	O
Resource	B-Operating_System
Forks	I-Operating_System
,	O
and	O
so	O
resource	B-Operating_System
forks	I-Operating_System
are	O
typically	O
transmitted	O
to	O
these	O
volumes	O
as-is	O
,	O
and	O
stored	O
by	O
the	O
server	O
transparently	O
to	O
clients	O
.	O
</s>
<s>
The	O
SMB	B-Operating_System
protocol	I-Operating_System
supports	O
a	O
file	B-Operating_System
metadata	O
system	O
similar	O
to	O
Macintosh	B-Device
forks	B-Application
known	O
as	O
Alternate	O
Data	O
Streams	O
(	O
ADSes	O
hereafter	O
)	O
.	O
</s>
<s>
macOS	B-Application
did	O
not	O
support	O
storing	O
resource	B-Operating_System
forks	I-Operating_System
in	O
ADSes	O
on	O
SMB	B-Operating_System
volumes	O
by	O
default	O
until	O
Mac	B-Device
OS	I-Device
X	I-Device
v10.6	I-Device
.	O
</s>
<s>
In	O
previous	O
versions	O
of	O
the	O
OS	O
,	O
including	O
upgraded	O
versions	O
of	O
10.6	B-Device
,	O
this	O
feature	O
can	O
be	O
enabled	O
with	O
a	O
param	O
change	O
or	O
by	O
creating	O
a	O
special	O
file	B-Operating_System
.	O
</s>
<s>
Networked	O
file	B-Operating_System
sharing	O
protocols	O
such	O
as	O
NFSv3	B-Protocol
and	O
FTP	B-Protocol
do	O
not	O
have	O
a	O
concept	O
of	O
file	B-Operating_System
metadata	O
,	O
and	O
so	O
there	O
is	O
no	O
way	O
to	O
natively	O
store	O
resource	B-Operating_System
forks	I-Operating_System
.	O
</s>
<s>
This	O
is	O
also	O
true	O
when	O
writing	O
to	O
certain	O
types	O
of	O
local	O
file	B-Application
systems	I-Application
,	O
including	O
UFS	B-Operating_System
,	O
and	O
on	O
SMB	B-Operating_System
volumes	O
where	O
Alternate	B-Application
Data	I-Application
Stream	I-Application
support	O
is	O
not	O
enabled	O
.	O
</s>
<s>
In	O
those	O
cases	O
,	O
macOS	B-Application
stores	O
metadata	O
and	O
resource	B-Operating_System
forks	I-Operating_System
using	O
a	O
technique	O
called	O
AppleDouble	B-Application
,	O
in	O
which	O
the	O
data	B-Operating_System
fork	I-Operating_System
is	O
written	O
as	O
one	O
file	B-Operating_System
,	O
and	O
the	O
resource	B-Operating_System
fork	I-Operating_System
and	O
metadata	O
are	O
written	O
as	O
an	O
entirely	O
separate	O
file	B-Operating_System
preceded	O
by	O
a	O
"	O
._	O
"	O
naming	O
convention	O
.	O
</s>
<s>
For	O
example	O
:	O
ExampleFile.psd	O
would	O
contain	O
the	O
data	B-Operating_System
fork	I-Operating_System
,	O
and	O
._ExampleFile.psd	O
would	O
contain	O
the	O
resource	B-Operating_System
fork	I-Operating_System
and	O
metadata	O
.	O
</s>
<s>
Compatibility	O
problems	O
can	O
arise	O
because	O
macOS	B-Application
will	O
handle	O
storage	O
of	O
resource	B-Operating_System
forks	I-Operating_System
differently	O
,	O
depending	O
on	O
macOS	B-Application
version	O
,	O
settings	O
,	O
and	O
file	B-Application
system	I-Application
type	O
.	O
</s>
<s>
For	O
example	O
,	O
on	O
an	O
SMB	B-Operating_System
network	O
with	O
a	O
mixture	O
of	O
10.5	O
and	O
10.6	B-Device
clients	O
.	O
</s>
<s>
A	O
freshly	O
installed	B-Application
10.6	B-Device
client	O
will	O
look	O
for	O
and	O
store	O
resource	B-Operating_System
forks	I-Operating_System
on	O
an	O
SMB	B-Operating_System
volume	O
in	O
ADSes	O
,	O
but	O
the	O
10.5	O
client	O
will	O
(	O
by	O
default	O
)	O
ignore	O
ADSes	O
and	O
use	O
AppleDouble	B-Application
format	I-Application
to	O
handle	O
forks	B-Application
.	O
</s>
<s>
If	O
a	O
fileserver	O
supports	O
both	O
AFP	B-Protocol
and	O
NFS	B-Protocol
,	O
then	O
clients	O
using	O
NFS	B-Protocol
will	O
store	O
files	O
in	O
AppleDouble	B-Application
format	I-Application
,	O
whereas	O
AFP	B-Protocol
users	O
will	O
stored	O
the	O
resource	B-Operating_System
fork	I-Operating_System
natively	O
.	O
</s>
<s>
In	O
those	O
cases	O
,	O
compatibility	O
can	O
sometimes	O
be	O
maintained	O
by	O
forcing	O
clients	O
to	O
use	O
,	O
or	O
not	O
use	O
,	O
AppleDouble	B-Application
format	I-Application
.	O
</s>
<s>
Many	O
fileservers	O
providing	O
AFP	B-Protocol
support	O
do	O
not	O
natively	O
support	O
resource	B-Operating_System
forks	I-Operating_System
on	O
their	O
local	O
file	B-Application
systems	I-Application
.	O
</s>
<s>
In	O
those	O
cases	O
the	O
forks	B-Application
may	O
be	O
stored	O
in	O
special	O
ways	O
,	O
such	O
as	O
specially	O
named	O
files	O
,	O
special	O
directories	O
,	O
or	O
even	O
Alternate	O
Data	O
Streams	O
.	O
</s>
<s>
Another	O
challenge	O
is	O
preserving	O
resource	B-Operating_System
forks	I-Operating_System
when	O
transmitting	O
files	O
using	O
non-resource	O
fork-aware	O
applications	O
or	O
with	O
certain	O
transfer	O
methods	O
,	O
including	O
email	O
and	O
FTP	B-Protocol
.	O
</s>
<s>
A	O
number	O
of	O
file	B-Operating_System
formats	O
,	O
such	O
as	O
MacBinary	B-General_Concept
and	O
BinHex	O
,	O
have	O
been	O
created	O
to	O
handle	O
this	O
.	O
</s>
<s>
Command-line	B-Application
system	O
tools	O
SplitForks	O
and	O
FixupResourceForks	O
allow	O
manual	O
flattening	O
and	O
merging	O
of	O
resource	B-Operating_System
forks	I-Operating_System
.	O
</s>
<s>
In	O
addition	O
,	O
a	O
file	B-Operating_System
server	O
seeking	O
to	O
present	O
file	B-Application
systems	I-Application
to	O
Macintosh	B-Device
clients	O
must	O
accommodate	O
the	O
resource	B-Operating_System
fork	I-Operating_System
as	O
well	O
as	O
the	O
data	B-Operating_System
fork	I-Operating_System
of	O
files	O
;	O
UNIX	B-Application
servers	O
providing	O
AFP	B-Protocol
support	O
usually	O
implement	O
this	O
with	O
hidden	O
directories	O
.	O
</s>
<s>
Older	O
applications	O
written	O
with	O
the	O
Carbon	B-Operating_System
API	I-Operating_System
have	O
a	O
potential	O
issue	O
when	O
being	O
ported	O
to	O
the	O
current	O
Intel	O
Macs	B-Device
.	O
</s>
<s>
While	O
the	O
Resource	O
Manager	O
and	O
operating	B-General_Concept
system	I-General_Concept
know	O
how	O
to	O
deserialize	O
data	O
correctly	O
for	O
common	O
resources	O
like	O
'	O
snd	O
'	O
or	O
'	O
moov	O
 '	O
,	O
resources	O
created	O
using	O
TMPL	O
resources	O
have	O
to	O
be	O
byte	O
swapped	O
manually	O
to	O
ensure	O
file	B-Operating_System
interoperability	O
between	O
PPC	O
and	O
Intel-based	O
versions	O
of	O
an	O
application	O
.	O
</s>
<s>
Until	O
the	O
advent	O
of	O
Mac	B-Application
OS	I-Application
X	I-Application
v10.4	I-Application
,	O
the	O
standard	O
UNIX	B-Application
command-line	B-Application
utilities	O
in	O
macOS	B-Application
(	O
such	O
as	O
cp	O
and	O
mv	O
)	O
did	O
not	O
respect	O
resource	B-Operating_System
forks	I-Operating_System
.	O
</s>
<s>
To	O
copy	O
files	O
with	O
resource	B-Operating_System
forks	I-Operating_System
,	O
one	O
had	O
to	O
use	O
ditto	O
or	O
CpMac	O
and	O
MvMac	O
.	O
</s>
<s>
The	O
concept	O
of	O
a	O
resource	O
manager	O
for	O
graphics	O
objects	O
,	O
to	O
save	O
memory	O
,	O
originated	O
in	O
the	O
OOZE	O
package	O
on	O
the	O
Xerox	B-Device
Alto	I-Device
in	O
Smalltalk-76	O
.	O
</s>
<s>
The	O
concept	O
is	O
now	O
largely	O
universal	O
in	O
all	O
modern	O
operating	B-General_Concept
systems	I-General_Concept
.	O
</s>
<s>
However	O
,	O
the	O
concept	O
of	O
the	O
resource	B-Operating_System
fork	I-Operating_System
remains	O
peculiar	O
to	O
the	O
Macintosh	B-Device
.	O
</s>
<s>
Most	O
operating	B-General_Concept
systems	I-General_Concept
used	O
a	O
binary	O
file	B-Operating_System
containing	O
resources	O
,	O
which	O
is	O
then	O
"	O
tacked	O
onto	O
"	O
the	O
end	O
of	O
an	O
existing	O
program	O
file	B-Operating_System
.	O
</s>
<s>
This	O
solution	O
is	O
used	O
on	O
Microsoft	B-Application
Windows	I-Application
for	O
instance	O
,	O
and	O
similar	O
solutions	O
are	O
used	O
with	O
the	O
X	B-Operating_System
Window	I-Operating_System
System	I-Operating_System
,	O
although	O
the	O
resources	O
are	O
often	O
left	O
as	O
a	O
separate	O
file	B-Operating_System
.	O
</s>
<s>
The	O
Windows	B-Device
NT	I-Device
NTFS	B-Application
can	O
support	O
forks	B-Application
(	O
and	O
so	O
can	O
be	O
a	O
file	B-Operating_System
server	O
for	O
Mac	B-Device
files	O
)	O
,	O
the	O
native	O
feature	O
providing	O
that	O
support	O
is	O
called	O
an	O
alternate	B-Application
data	I-Application
stream	I-Application
.	O
</s>
<s>
Windows	B-Application
operating	I-Application
system	I-Application
features	O
(	O
such	O
as	O
the	O
standard	O
Summary	O
tab	O
in	O
the	O
Properties	O
page	O
for	O
non-Office	O
files	O
)	O
and	O
Windows	B-Application
applications	I-Application
use	O
them	O
and	O
Microsoft	O
was	O
developing	O
a	O
next-generation	B-Application
file	I-Application
system	I-Application
that	O
has	O
this	O
sort	O
of	O
feature	O
as	O
basis	O
.	O
</s>
<s>
Early	O
versions	O
of	O
the	O
BeOS	B-Application
implemented	O
a	O
database	O
within	O
the	O
file	B-Application
system	I-Application
,	O
which	O
could	O
be	O
used	O
in	O
a	O
manner	O
analogous	O
to	O
a	O
resource	B-Operating_System
fork	I-Operating_System
.	O
</s>
<s>
Performance	O
issues	O
led	O
to	O
a	O
change	O
in	O
later	O
releases	O
to	O
a	O
system	O
of	O
complex	O
file	B-Application
system	I-Application
attributes	O
.	O
</s>
<s>
Under	O
this	O
system	O
resources	O
were	O
handled	O
in	O
a	O
fashion	O
somewhat	O
more	O
analogous	O
to	O
the	O
Mac	B-Device
.	O
</s>
<s>
AmigaOS	B-Application
does	O
not	O
use	O
forked	O
files	O
.	O
</s>
<s>
Its	O
executable	B-Application
files	I-Application
are	O
internally	O
divided	O
into	O
a	O
modular	O
structure	O
of	O
large	O
pieces	O
(	O
hunk	O
)	O
capable	O
of	O
storing	O
code	O
,	O
data	O
,	O
and	O
additional	O
information	O
.	O
</s>
<s>
Similarly	O
,	O
data	O
and	O
project	O
files	O
have	O
a	O
chunk	B-General_Concept
structure	O
codified	O
in	O
the	O
IFF	B-Device
standard	O
.	O
</s>
<s>
Other	O
file	B-Operating_System
types	O
are	O
stored	O
similarly	O
to	O
other	O
operating	B-General_Concept
systems	I-General_Concept
.	O
</s>
<s>
Though	O
not	O
strictly	O
a	O
resource	B-Operating_System
fork	I-Operating_System
,	O
AmigaOS	B-Application
stores	O
meta	O
data	O
in	O
files	O
known	O
as	O
.info	O
files	O
.	O
</s>
<s>
MyProject	O
would	O
be	O
the	O
actual	O
project	O
data	O
and	O
MyProject.info	O
would	O
contain	O
the	O
project	O
icon	O
,	O
information	O
regarding	O
which	O
program	O
is	O
needed	O
to	O
open	O
the	O
project	O
(	O
since	O
there	O
is	O
no	O
application	O
binding	O
in	O
AmigaOS	B-Application
)	O
,	O
special	O
project	O
options	O
and	O
any	O
user	O
comments	O
.	O
</s>
<s>
.info	O
files	O
are	O
invisible	O
on	O
the	O
Amiga	O
's	O
desktop	O
(	O
Workbench	B-Operating_System
)	O
.	O
</s>
<s>
The	O
icon	O
on	O
the	O
desktop	O
,	O
taken	O
from	O
the	O
.info	O
itself	O
,	O
is	O
the	O
interface	B-Architecture
metaphor	I-Architecture
through	O
which	O
the	O
user	O
interacts	O
both	O
with	O
the	O
project	O
itself	O
and	O
its	O
associated	O
.info	O
file	B-Operating_System
.	O
</s>
<s>
A	O
dialog	O
box	O
accessible	O
by	O
right-clicking	O
the	O
icon	O
allows	O
the	O
user	O
to	O
see	O
and	O
modify	O
the	O
metadata	O
present	O
in	O
the	O
.info	O
file	B-Operating_System
.	O
</s>
<s>
.info	O
files	O
can	O
be	O
seen	O
as	O
individual	O
files	O
in	O
the	O
command-line	B-Application
interface	I-Application
or	O
a	O
File	B-Application
manager	I-Application
.	O
</s>
<s>
Modern	O
AmigaOS	B-Application
clones	O
(	O
AROS	B-Application
,	O
MorphOS	B-Operating_System
and	O
AOS4	B-Application
)	O
inherit	O
the	O
structure	O
(	O
complete	O
with	O
metadata	O
)	O
of	O
the	O
.info	O
files	O
of	O
older	O
AmigaOS	B-Application
versions	O
,	O
and	O
can	O
also	O
accept	O
standard	O
PNG	O
graphic	O
files	O
as	O
icon	O
bitmaps	O
in	O
their	O
.info	O
files	O
.	O
</s>
<s>
NeXT	O
operating	B-General_Concept
systems	I-General_Concept
NeXTSTEP	B-Application
and	O
OPENSTEP	B-Operating_System
,	O
their	O
successor	O
,	O
macOS	B-Application
,	O
and	O
other	O
systems	O
like	O
RISC	B-Operating_System
OS	I-Operating_System
implemented	O
another	O
solution	O
.	O
</s>
<s>
These	O
resources	O
are	O
then	O
placed	O
in	O
a	O
directory	O
along	O
with	O
the	O
executable	B-Application
code	I-Application
and	O
"	O
raw	O
data	O
"	O
.	O
</s>
<s>
The	O
directory	O
(	O
called	O
a	O
"	O
bundle	B-Application
"	O
or	O
"	O
application	B-Application
directory	I-Application
"	O
)	O
is	O
then	O
presented	O
to	O
the	O
user	O
as	O
the	O
application	O
itself	O
.	O
</s>
<s>
This	O
solution	O
provides	O
all	O
of	O
the	O
same	O
functionality	O
as	O
the	O
resource	B-Operating_System
fork	I-Operating_System
,	O
but	O
allows	O
the	O
resources	O
to	O
be	O
easily	O
manipulated	O
by	O
any	O
application	O
a	O
"	O
resource	O
editor	O
"	O
(	O
like	O
ResEdit	B-Operating_System
)	O
is	O
not	O
needed	O
.	O
</s>
<s>
From	O
the	O
command-line	B-Application
interface	I-Application
,	O
the	O
bundle	B-Application
appears	O
to	O
be	O
a	O
normal	O
directory	O
.	O
</s>
<s>
This	O
approach	O
was	O
not	O
an	O
option	O
on	O
the	O
classic	B-Application
Mac	I-Application
OS	I-Application
,	O
since	O
the	O
file	B-Application
system	I-Application
(	O
MFS	B-Application
)	O
did	O
not	O
support	O
separate	O
catalog	O
directories	O
.	O
</s>
<s>
When	O
catalog	O
file	B-Operating_System
support	O
was	O
included	O
in	O
Mac	B-Application
OS	I-Application
,	O
with	O
the	O
HFS	B-Application
filesystem	B-Application
,	O
the	O
resource	B-Operating_System
fork	I-Operating_System
was	O
retained	O
.	O
</s>
<s>
macOS	B-Application
does	O
retain	O
the	O
classic	O
Resource	O
Manager	O
API	B-Application
as	O
part	O
of	O
its	O
Carbon	B-Operating_System
libraries	O
for	O
backward	O
compatibility	O
.	O
</s>
<s>
However	O
,	O
the	O
resources	O
themselves	O
can	O
now	O
be	O
stored	O
in	O
separate	O
data	O
files	O
within	O
the	O
file	B-Application
system	I-Application
the	O
Resource	O
Manager	O
now	O
hides	O
this	O
implementation	O
change	O
from	O
the	O
client	O
code	O
.	O
</s>
