Jack Jansen | da53c52 | 1995-10-10 14:43:20 +0000 | [diff] [blame] | 1 | |
| 2 | \section{Standard module \sectcode{macostools}} |
| 3 | \stmodindex{macostools} |
| 4 | |
| 5 | This module contains some convenience routines for file-manipulation |
| 6 | on the Macintosh. |
| 7 | |
| 8 | The \code{macostools} module defines the following functions: |
| 9 | |
| 10 | \renewcommand{\indexsubitem}{(in module macostools)} |
| 11 | |
| 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 |
| 19 | are not copied. |
| 20 | \end{funcdesc} |
| 21 | |
| 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 |
| 25 | pathnames. |
| 26 | \end{funcdesc} |
| 27 | |
| 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. |
| 31 | \end{funcdesc} |
| 32 | |
| 33 | \begin{datadesc}{BUFSIZ} |
| 34 | The buffer size for \code{copy}, default 1 megabyte. |
| 35 | \end{datadesc} |
| 36 | |
| 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. |