2 \section{Standard module
\sectcode{macostools
}}
3 \stmodindex{macostools
}
5 This module contains some convenience routines for file-manipulation
8 The
\code{macostools
} module defines the following functions:
10 \renewcommand{\indexsubitem}{(in module macostools)
}
12 \begin{funcdesc
}{copy
}{src\, dst
\optional{\, createpath
}}
13 Copy file
\var{src
} to
\var{dst
}. The files can be specified as
14 pathnames or
\code{FSSpec
} objects. If
\var{createpath
} is non-zero
15 \var{dst
} must be a pathname and the folders leading to the
16 destination are created if necessary.
17 The method copies data and resource fork and some finder information
18 (creator, type and flags). Custom icons, comments and icon position
22 \begin{funcdesc
}{copytree
}{src\, dst
}
23 Recursively copy a file tree from
\var{src
} to
\var{dst
}, creating
24 folders as needed.
\var{Src
} and
\var{dst
} should be specified as
28 \begin{funcdesc
}{mkalias
}{src\, dst
}
29 Create a finder alias
\var{dst
} pointing to
\var{src
}. Both may be
30 specified as pathnames or
\var{FSSpec
} objects.
33 \begin{datadesc
}{BUFSIZ
}
34 The buffer size for
\code{copy
}, default
1 megabyte.
37 Note that the process of creating finder aliases is not specified in
38 the Apple documentation. Hence, aliases created with
\code{mkalias
}
39 could conceivably have incompatible behaviour in some cases.