diff --git a/Doc/conf.py b/Doc/conf.py index 738c9901eef06f..ca192bde70729f 100644 --- a/Doc/conf.py +++ b/Doc/conf.py @@ -34,6 +34,8 @@ 'sphinx.ext.coverage', 'sphinx.ext.doctest', 'sphinx.ext.extlinks', + 'sphinx.ext.autodoc', + 'sphinx.ext.autosummary', ] # Skip if downstream redistributors haven't installed them diff --git a/Doc/library/pathlib.rst b/Doc/library/pathlib.rst index a42ac1f8bcdf71..0296146a7f20a9 100644 --- a/Doc/library/pathlib.rst +++ b/Doc/library/pathlib.rst @@ -93,6 +93,130 @@ Opening a file:: '#!/bin/bash\n' +Summary +------- + +.. currentmodule:: pathlib + +.. autosummary:: + + .. **Exceptions** + + UnsupportedOperation + + .. **Pure paths** + + PurePath + PurePosixPath + PureWindowsPath + + .. **Pure path attributes** + + PurePath.parts + PurePath.parser + PurePath.drive + PurePath.root + PurePath.anchor + PurePath.parents + PurePath.parent + PurePath.name + PurePath.suffix + PurePath.suffixes + PurePath.stem + + .. **Pure path methods** + + PurePath.as_posix + PurePath.is_absolute + PurePath.is_relative_to + PurePath.is_reserved + PurePath.joinpath + PurePath.full_match + PurePath.match + PurePath.relative_to + PurePath.with_name + PurePath.with_stem + PurePath.with_suffix + PurePath.with_segments + + .. **Concrete paths** + + Path + PosixPath + WindowsPath + + .. **Parsing and generating URIs** + + Path.from_uri + Path.as_uri + + .. **Expanding and resolving paths** + + Path.home + Path.expanduser + Path.cwd + Path.absolute + Path.resolve + Path.readlink + + .. **Querying file type and status** + + Path.stat + Path.lstat + Path.exists + Path.is_file + Path.is_dir + Path.is_symlink + Path.is_junction + Path.is_mount + Path.is_socket + Path.is_fifo + Path.is_block_device + Path.is_char_device + Path.samefile + + .. **Reading and writing files** + + Path.open + Path.read_text + Path.read_bytes + Path.write_text + Path.write_bytes + + .. **Reading directories** + + Path.iterdir + Path.scandir + Path.glob + Path.rglob + Path.walk + + .. **Creating files and directories** + + Path.touch + Path.mkdir + Path.symlink_to + Path.hardlink_to + + .. **Copying, moving and deleting** + + Path.copy + Path.copy_into + Path.rename + Path.replace + Path.move + Path.move_into + Path.unlink + Path.rmdir + + .. **Permissions and ownership** + + Path.owner + Path.group + Path.chmod + Path.lchmod + + Exceptions ----------