Uh oh!
There was an error while loading. Please reload this page.
GH-73991: Split "Directory and file operations" section in shutil docs - #119159
GH-73991: Split "Directory and file operations" section in shutil docs#119159barneygale wants to merge 1 commit into
Conversation
…il docs Split "Directory and file operations" section in five: 1. "Copying files" 2. "Recursively copying, moving and removing" 3. "Querying disk usage" 4. "Changing file ownership" 5. "Finding executables" The "Platform-dependent efficient copy operations" information is moved to "Copying files". The examples of `copytree()` and `rmtree()` are moved into their function docs. This should be slightly easier to navigate for users, and draws more of a distinction between the lower-level file copying functions and the higher-level `copytree()` / `rmtree()` / `move()` functions.
| return [] # nothing will be ignored | ||
| copytree(source, destination, ignore=_logpath) | ||
There was a problem hiding this comment.
Taken in isolation, this example seems weird, as it's not actually ignoring anything. I'd suggest keeping the ignore_patterns example from the original text as well, and describe this example as something like:
You don't have to ignore anything, if you simply want to run some code for every directory that gets processed. For example, this snippet uses the ignore argument to add a logging call::
pfmoore
left a comment
There was a problem hiding this comment.
Apart from the one comment I made (I accidentally clicked "add a single comment" rather than "Start a review" 🙁) this LGTM
barneygale
commented
Aug 26, 2024
Withdrawing this PR. With the work on GH-73991 at its end, we actually didn't need to touch |
Split "Directory and file operations" section in five:
The "Platform-dependent efficient copy operations" information is moved to "Copying files". The examples of
copytree()andrmtree()are moved into their function docs.This should be slightly easier to navigate for users, and draws more of a distinction between the lower-level file copying functions and the higher-level
copytree()/rmtree()/move()functions.📚 Documentation preview 📚: https://cpython-previews--119159.org.readthedocs.build/