@@ -1055,3 +1055,36 @@ call fails (for example because the path doesn't exist):
10551055 'Text file contents'
10561056
10571057 .. versionadded :: 3.5
1058+
1059+ Correspondence to tools in the :mod: `os ` module
1060+ -----------------------------------------------
1061+
1062+ Below is a table mapping various :mod: `os ` functions to their corresponding
1063+ :class: `PurePath `/:class: `Path ` equivalent.
1064+
1065+ .. note ::
1066+
1067+ Although :func: `os.path.relpath ` and :meth: `PurePath.relative_to ` have some
1068+ overlapping use-cases, their semantics differ enough to warrant not
1069+ considering them equivalent.
1070+
1071+ ============================ ==============================
1072+ os and os.path pathlib
1073+ ============================ ==============================
1074+ :func: `os.path.abspath ` :meth: `Path.resolve `
1075+ :func: `os.getcwd ` :func: `Path.cwd `
1076+ :func: `os.path.exists ` :meth: `Path.exists `
1077+ :func: `os.path.expanduser ` :meth: `Path.expanduser ` and
1078+ :meth: `Path.home `
1079+ :func: `os.path.isdir ` :meth: `Path.is_dir `
1080+ :func: `os.path.isfile ` :meth: `Path.is_file `
1081+ :func: `os.path.islink ` :meth: `Path.is_symlink `
1082+ :func: `os.stat ` :meth: `Path.stat `,
1083+ :meth: `Path.owner `,
1084+ :meth: `Path.group `
1085+ :func: `os.path.isabs ` :meth: `PurePath.is_absolute `
1086+ :func: `os.path.join ` :func: `PurePath.joinpath `
1087+ :func: `os.path.basename ` :data: `PurePath.name `
1088+ :func: `os.path.dirname ` :data: `PurePath.parent `
1089+ :func: `os.path.splitext ` :data: `PurePath.suffix `
1090+ ============================ ==============================
0 commit comments