PyDocs

File and Directory Access

shutil

Utility functions for copying and archiving files and directory trees.

XXX The functions here don't copy the resource fork or other metadata on Mac.
Symbols in shutil

c

chown
Change owner user and group of the given path.
copy
Copy data and mode bits ("cp src dst").
copy2
Copy data and metadata.
copyfile
Copy data from src to dst in the most efficient way possible.
copyfileobj
copy data from file-like object fsrc to file-like object fdst
copymode
Copy mode bits from src to dst.
copystat
Copy file metadata
copytree
Recursively copy a directory tree and return the destination directory.

d

disk_usage
Return disk usage statistics about the given path.

e

Error
Subclass of OSError collecting exceptions raised during a multi-file operation.

g

get_archive_formats
Returns a list of supported formats for archiving and unarchiving.
get_terminal_size
Get the size of the terminal window.
get_unpack_formats
Returns a list of supported formats for unpacking.

i

ignore_patterns
Function that can be used as copytree() ignore parameter.

m

make_archive
Create an archive file (eg.
move
Recursively move a file or directory to another location.

r

register_archive_format
Registers an archive format.
register_unpack_format
Registers an unpack format.
rmtree
Recursively delete a directory tree.

s

SameFileError
Raised when source and destination are the same file.
SpecialFileError
Raised when trying to do a kind of operation (e.g.

u

unpack_archive
Unpack an archive.
unregister_archive_format
Remove the archive format name from the list of supported formats.
unregister_unpack_format
Removes the pack format from the registry.

w

which
Given a command, mode, and a PATH string, return the path which conforms to the given mode on the PATH, or None if there is no such file.