macostools -- Python library reference



Next: mactcp Prev: MacOS Up: Macintosh Specific Services Top: Top

14.8. Standard module macostools

This module contains some convenience routines for file-manipulation on the Macintosh.

The macostools module defines the following functions:

copy (src, dst[, createpath]) -- function of module macostools
Copy file src to dst. The files can be specified as pathnames or FSSpec objects. If createpath is non-zero dst must be a pathname and the folders leading to the destination are created if necessary. The method copies data and resource fork and some finder information (creator, type and flags). Custom icons, comments and icon position are not copied.
copytree (src, dst) -- function of module macostools
Recursively copy a file tree from src to dst, creating folders as needed. Src and dst should be specified as pathnames.
mkalias (src, dst) -- function of module macostools
Create a finder alias dst pointing to src. Both may be specified as pathnames or FSSpec objects.
BUFSIZ -- data of module macostools
The buffer size for copy, default 1 megabyte.
Note that the process of creating finder aliases is not specified in the Apple documentation. Hence, aliases created with mkalias could conceivably have incompatible behaviour in some cases.

Next: mactcp Prev: MacOS Up: Macintosh Specific Services Top: Top