Staging: this is not the live site, pydocs.org.
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.
© Python Software Foundation. PSF License Version 2 · Official docs ↗
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
- 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.
m
- move
- Recursively move a file or directory to another location.
r
- rmtree
- Recursively delete a directory tree.
s
- SameFileError
- Raised when source and destination are the same file.
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.