{
    "mode": "pydoc",
    "parameter": "pathlib",
    "section": "",
    "url": "https://www.chedong.com/phpMan.php/pydoc/pathlib/json",
    "generated": "2026-06-02T13:18:29Z",
    "sections": {
        "NAME": {
            "content": "pathlib\n",
            "subsections": []
        },
        "MODULE REFERENCE": {
            "content": "https://docs.python.org/3.10/library/pathlib.html\n\nThe following documentation is automatically generated from the Python\nsource files.  It may be incomplete, incorrect or include features that\nare considered implementation detail and may vary between Python\nimplementations.  When in doubt, consult the module reference at the\nlocation listed above.\n",
            "subsections": []
        },
        "CLASSES": {
            "content": "builtins.object\nPurePath\nPath\nPosixPath(Path, PurePosixPath)\nWindowsPath(Path, PureWindowsPath)\nPurePosixPath\nPureWindowsPath\n",
            "subsections": [
                {
                    "name": "class Path",
                    "content": "|  Path(*args, kwargs)\n|\n|  PurePath subclass that can make system calls.\n|\n|  Path represents a filesystem path but unlike PurePath, also offers\n|  methods to do system calls on path objects. Depending on your system,\n|  instantiating a Path will return either a PosixPath or a WindowsPath\n|  object. You can also instantiate a PosixPath or WindowsPath directly,\n|  but cannot instantiate a WindowsPath on a POSIX system or vice versa.\n|\n|  Method resolution order:\n|      Path\n|      PurePath\n|      builtins.object\n|\n|  Methods defined here:\n|\n|  enter(self)\n|\n|  exit(self, t, v, tb)\n|\n|  absolute(self)\n|      Return an absolute version of this path.  This function works\n|      even if the path doesn't point to anything.\n|\n|      No normalization is done, i.e. all '.' and '..' will be kept along.\n|      Use resolve() to get the canonical path to a file.\n|\n|  chmod(self, mode, *, followsymlinks=True)\n|      Change the permissions of the path, like os.chmod().\n|\n|  exists(self)\n|      Whether this path exists.\n|\n|  expanduser(self)\n|      Return a new path with expanded ~ and ~user constructs\n|      (as returned by os.path.expanduser)\n|\n|  glob(self, pattern)\n|      Iterate over this subtree and yield all existing files (of any\n|      kind, including directories) matching the given relative pattern.\n|\n|  group(self)\n|      Return the group name of the file gid.\n|\n|  hardlinkto(self, target)\n|      Make this path a hard link pointing to the same file as *target*.\n|\n|      Note the order of arguments (self, target) is the reverse of os.link's.\n|\n|  isblockdevice(self)\n|      Whether this path is a block device.\n|\n|  ischardevice(self)\n|      Whether this path is a character device.\n|\n|  isdir(self)\n|      Whether this path is a directory.\n|\n|  isfifo(self)\n|      Whether this path is a FIFO.\n|\n|  isfile(self)\n|      Whether this path is a regular file (also True for symlinks pointing\n|      to regular files).\n|\n|  ismount(self)\n|      Check if this path is a POSIX mount point\n|\n|  issocket(self)\n|      Whether this path is a socket.\n|\n|  issymlink(self)\n|      Whether this path is a symbolic link.\n|\n|  iterdir(self)\n|      Iterate over the files in this directory.  Does not yield any\n|      result for the special paths '.' and '..'.\n|\n|  lchmod(self, mode)\n|      Like chmod(), except if the path points to a symlink, the symlink's\n|      permissions are changed, rather than its target's.\n|\n|  linkto(self, target)\n|      Make the target path a hard link pointing to this path.\n|\n|      Note this function does not make this path a hard link to *target*,\n|      despite the implication of the function and argument names. The order\n|      of arguments (target, link) is the reverse of Path.symlinkto, but\n|      matches that of os.link.\n|\n|      Deprecated since Python 3.10 and scheduled for removal in Python 3.12.\n|      Use `hardlinkto()` instead.\n|\n|  lstat(self)\n|      Like stat(), except if the path points to a symlink, the symlink's\n|      status information is returned, rather than its target's.\n|\n|  mkdir(self, mode=511, parents=False, existok=False)\n|      Create a new directory at this given path.\n|\n|  open(self, mode='r', buffering=-1, encoding=None, errors=None, newline=None)\n|      Open the file pointed by this path and return a file object, as\n|      the built-in open() function does.\n|\n|  owner(self)\n|      Return the login name of the file owner.\n|\n|  readbytes(self)\n|      Open the file in bytes mode, read it, and close the file.\n|\n|  readtext(self, encoding=None, errors=None)\n|      Open the file in text mode, read it, and close the file.\n|\n|  readlink(self)\n|      Return the path to which the symbolic link points.\n|\n|  rename(self, target)\n|      Rename this path to the target path.\n|\n|      The target path may be absolute or relative. Relative paths are\n|      interpreted relative to the current working directory, *not* the\n|      directory of the Path object.\n|\n|      Returns the new Path instance pointing to the target path.\n|\n|  replace(self, target)\n|      Rename this path to the target path, overwriting if that path exists.\n|\n|      The target path may be absolute or relative. Relative paths are\n|      interpreted relative to the current working directory, *not* the\n|      directory of the Path object.\n|\n|      Returns the new Path instance pointing to the target path.\n|\n|  resolve(self, strict=False)\n|      Make the path absolute, resolving all symlinks on the way and also\n|      normalizing it (for example turning slashes into backslashes under\n|      Windows).\n|\n|  rglob(self, pattern)\n|      Recursively yield all existing files (of any kind, including\n|      directories) matching the given relative pattern, anywhere in\n|      this subtree.\n|\n|  rmdir(self)\n|      Remove this directory.  The directory must be empty.\n|\n|  samefile(self, otherpath)\n|      Return whether otherpath is the same or not as this file\n|      (as returned by os.path.samefile()).\n|\n|  stat(self, *, followsymlinks=True)\n|      Return the result of the stat() system call on this path, like\n|      os.stat() does.\n|\n|  symlinkto(self, target, targetisdirectory=False)\n|      Make this path a symlink pointing to the target path.\n|      Note the order of arguments (link, target) is the reverse of os.symlink.\n|\n|  touch(self, mode=438, existok=True)\n|      Create this file with the given access mode, if it doesn't exist.\n|\n|  unlink(self, missingok=False)\n|      Remove this file or link.\n|      If the path is a directory, use rmdir() instead.\n|\n|  writebytes(self, data)\n|      Open the file in bytes mode, write to it, and close the file.\n|\n|  writetext(self, data, encoding=None, errors=None, newline=None)\n|      Open the file in text mode, write to it, and close the file.\n|\n|  ----------------------------------------------------------------------\n|  Class methods defined here:\n|\n|  cwd() from builtins.type\n|      Return a new path pointing to the current working directory\n|      (as returned by os.getcwd()).\n|\n|  home() from builtins.type\n|      Return a new path pointing to the user's home directory (as\n|      returned by os.path.expanduser('~')).\n|\n|  ----------------------------------------------------------------------\n|  Static methods defined here:\n|\n|  new(cls, *args, kwargs)\n|      Construct a PurePath from one or several strings and or existing\n|      PurePath objects.  The strings and path objects are combined so as\n|      to yield a canonicalized path, which is incorporated into the\n|      new PurePath object.\n|\n|  ----------------------------------------------------------------------\n|  Methods inherited from PurePath:\n|\n|  bytes(self)\n|      Return the bytes representation of the path.  This is only\n|      recommended to use under Unix.\n|\n|  eq(self, other)\n|      Return self==value.\n|\n|  fspath(self)\n|\n|  ge(self, other)\n|      Return self>=value.\n|\n|  gt(self, other)\n|      Return self>value.\n|\n|  hash(self)\n|      Return hash(self).\n|\n|  le(self, other)\n|      Return self<=value.\n|\n|  lt(self, other)\n|      Return self<value.\n|\n|  reduce(self)\n|      Helper for pickle.\n|\n|  repr(self)\n|      Return repr(self).\n|\n|  rtruediv(self, key)\n|\n|  str(self)\n|      Return the string representation of the path, suitable for\n|      passing to system calls.\n|\n|  truediv(self, key)\n|\n|  asposix(self)\n|      Return the string representation of the path with forward (/)\n|      slashes.\n|\n|  asuri(self)\n|      Return the path as a 'file' URI.\n|\n|  isabsolute(self)\n|      True if the path is absolute (has both a root and, if applicable,\n|      a drive).\n|\n|  isrelativeto(self, *other)\n|      Return True if the path is relative to another path or False.\n|\n|  isreserved(self)\n|      Return True if the path contains one of the special names reserved\n|      by the system, if any.\n|\n|  joinpath(self, *args)\n|      Combine this path with one or several arguments, and return a\n|      new path representing either a subpath (if all arguments are relative\n|      paths) or a totally different path (if one of the arguments is\n|      anchored).\n|\n|  match(self, pathpattern)\n|      Return True if this path matches the given pattern.\n|\n|  relativeto(self, *other)\n|      Return the relative path to another path identified by the passed\n|      arguments.  If the operation is not possible (because this is not\n|      a subpath of the other path), raise ValueError.\n|\n|  withname(self, name)\n|      Return a new path with the file name changed.\n|\n|  withstem(self, stem)\n|      Return a new path with the stem changed.\n|\n|  withsuffix(self, suffix)\n|      Return a new path with the file suffix changed.  If the path\n|      has no suffix, add given suffix.  If the given suffix is an empty\n|      string, remove the suffix from the path.\n|\n|  ----------------------------------------------------------------------\n|  Class methods inherited from PurePath:\n|\n|  classgetitem(type) from builtins.type\n|\n|  ----------------------------------------------------------------------\n|  Readonly properties inherited from PurePath:\n|\n|  anchor\n|      The concatenation of the drive and root, or ''.\n|\n|  drive\n|      The drive prefix (letter or UNC path), if any.\n|\n|  name\n|      The final path component, if any.\n|\n|  parent\n|      The logical parent of the path.\n|\n|  parents\n|      A sequence of this path's logical parents.\n|\n|  parts\n|      An object providing sequence-like access to the\n|      components in the filesystem path.\n|\n|  root\n|      The root of the path, if any.\n|\n|  stem\n|      The final path component, minus its last suffix.\n|\n|  suffix\n|      The final component's last suffix, if any.\n|\n|      This includes the leading period. For example: '.txt'\n|\n|  suffixes\n|      A list of the final component's suffixes, if any.\n|\n|      These include the leading periods. For example: ['.tar', '.gz']\n"
                },
                {
                    "name": "class PosixPath",
                    "content": "|  PosixPath(*args, kwargs)\n|\n|  Path subclass for non-Windows systems.\n|\n|  On a POSIX system, instantiating a Path should return this object.\n|\n|  Method resolution order:\n|      PosixPath\n|      Path\n|      PurePosixPath\n|      PurePath\n|      builtins.object\n|\n|  Methods inherited from Path:\n|\n|  enter(self)\n|\n|  exit(self, t, v, tb)\n|\n|  absolute(self)\n|      Return an absolute version of this path.  This function works\n|      even if the path doesn't point to anything.\n|\n|      No normalization is done, i.e. all '.' and '..' will be kept along.\n|      Use resolve() to get the canonical path to a file.\n|\n|  chmod(self, mode, *, followsymlinks=True)\n|      Change the permissions of the path, like os.chmod().\n|\n|  exists(self)\n|      Whether this path exists.\n|\n|  expanduser(self)\n|      Return a new path with expanded ~ and ~user constructs\n|      (as returned by os.path.expanduser)\n|\n|  glob(self, pattern)\n|      Iterate over this subtree and yield all existing files (of any\n|      kind, including directories) matching the given relative pattern.\n|\n|  group(self)\n|      Return the group name of the file gid.\n|\n|  hardlinkto(self, target)\n|      Make this path a hard link pointing to the same file as *target*.\n|\n|      Note the order of arguments (self, target) is the reverse of os.link's.\n|\n|  isblockdevice(self)\n|      Whether this path is a block device.\n|\n|  ischardevice(self)\n|      Whether this path is a character device.\n|\n|  isdir(self)\n|      Whether this path is a directory.\n|\n|  isfifo(self)\n|      Whether this path is a FIFO.\n|\n|  isfile(self)\n|      Whether this path is a regular file (also True for symlinks pointing\n|      to regular files).\n|\n|  ismount(self)\n|      Check if this path is a POSIX mount point\n|\n|  issocket(self)\n|      Whether this path is a socket.\n|\n|  issymlink(self)\n|      Whether this path is a symbolic link.\n|\n|  iterdir(self)\n|      Iterate over the files in this directory.  Does not yield any\n|      result for the special paths '.' and '..'.\n|\n|  lchmod(self, mode)\n|      Like chmod(), except if the path points to a symlink, the symlink's\n|      permissions are changed, rather than its target's.\n|\n|  linkto(self, target)\n|      Make the target path a hard link pointing to this path.\n|\n|      Note this function does not make this path a hard link to *target*,\n|      despite the implication of the function and argument names. The order\n|      of arguments (target, link) is the reverse of Path.symlinkto, but\n|      matches that of os.link.\n|\n|      Deprecated since Python 3.10 and scheduled for removal in Python 3.12.\n|      Use `hardlinkto()` instead.\n|\n|  lstat(self)\n|      Like stat(), except if the path points to a symlink, the symlink's\n|      status information is returned, rather than its target's.\n|\n|  mkdir(self, mode=511, parents=False, existok=False)\n|      Create a new directory at this given path.\n|\n|  open(self, mode='r', buffering=-1, encoding=None, errors=None, newline=None)\n|      Open the file pointed by this path and return a file object, as\n|      the built-in open() function does.\n|\n|  owner(self)\n|      Return the login name of the file owner.\n|\n|  readbytes(self)\n|      Open the file in bytes mode, read it, and close the file.\n|\n|  readtext(self, encoding=None, errors=None)\n|      Open the file in text mode, read it, and close the file.\n|\n|  readlink(self)\n|      Return the path to which the symbolic link points.\n|\n|  rename(self, target)\n|      Rename this path to the target path.\n|\n|      The target path may be absolute or relative. Relative paths are\n|      interpreted relative to the current working directory, *not* the\n|      directory of the Path object.\n|\n|      Returns the new Path instance pointing to the target path.\n|\n|  replace(self, target)\n|      Rename this path to the target path, overwriting if that path exists.\n|\n|      The target path may be absolute or relative. Relative paths are\n|      interpreted relative to the current working directory, *not* the\n|      directory of the Path object.\n|\n|      Returns the new Path instance pointing to the target path.\n|\n|  resolve(self, strict=False)\n|      Make the path absolute, resolving all symlinks on the way and also\n|      normalizing it (for example turning slashes into backslashes under\n|      Windows).\n|\n|  rglob(self, pattern)\n|      Recursively yield all existing files (of any kind, including\n|      directories) matching the given relative pattern, anywhere in\n|      this subtree.\n|\n|  rmdir(self)\n|      Remove this directory.  The directory must be empty.\n|\n|  samefile(self, otherpath)\n|      Return whether otherpath is the same or not as this file\n|      (as returned by os.path.samefile()).\n|\n|  stat(self, *, followsymlinks=True)\n|      Return the result of the stat() system call on this path, like\n|      os.stat() does.\n|\n|  symlinkto(self, target, targetisdirectory=False)\n|      Make this path a symlink pointing to the target path.\n|      Note the order of arguments (link, target) is the reverse of os.symlink.\n|\n|  touch(self, mode=438, existok=True)\n|      Create this file with the given access mode, if it doesn't exist.\n|\n|  unlink(self, missingok=False)\n|      Remove this file or link.\n|      If the path is a directory, use rmdir() instead.\n|\n|  writebytes(self, data)\n|      Open the file in bytes mode, write to it, and close the file.\n|\n|  writetext(self, data, encoding=None, errors=None, newline=None)\n|      Open the file in text mode, write to it, and close the file.\n|\n|  ----------------------------------------------------------------------\n|  Class methods inherited from Path:\n|\n|  cwd() from builtins.type\n|      Return a new path pointing to the current working directory\n|      (as returned by os.getcwd()).\n|\n|  home() from builtins.type\n|      Return a new path pointing to the user's home directory (as\n|      returned by os.path.expanduser('~')).\n|\n|  ----------------------------------------------------------------------\n|  Static methods inherited from Path:\n|\n|  new(cls, *args, kwargs)\n|      Construct a PurePath from one or several strings and or existing\n|      PurePath objects.  The strings and path objects are combined so as\n|      to yield a canonicalized path, which is incorporated into the\n|      new PurePath object.\n|\n|  ----------------------------------------------------------------------\n|  Methods inherited from PurePath:\n|\n|  bytes(self)\n|      Return the bytes representation of the path.  This is only\n|      recommended to use under Unix.\n|\n|  eq(self, other)\n|      Return self==value.\n|\n|  fspath(self)\n|\n|  ge(self, other)\n|      Return self>=value.\n|\n|  gt(self, other)\n|      Return self>value.\n|\n|  hash(self)\n|      Return hash(self).\n|\n|  le(self, other)\n|      Return self<=value.\n|\n|  lt(self, other)\n|      Return self<value.\n|\n|  reduce(self)\n|      Helper for pickle.\n|\n|  repr(self)\n|      Return repr(self).\n|\n|  rtruediv(self, key)\n|\n|  str(self)\n|      Return the string representation of the path, suitable for\n|      passing to system calls.\n|\n|  truediv(self, key)\n|\n|  asposix(self)\n|      Return the string representation of the path with forward (/)\n|      slashes.\n|\n|  asuri(self)\n|      Return the path as a 'file' URI.\n|\n|  isabsolute(self)\n|      True if the path is absolute (has both a root and, if applicable,\n|      a drive).\n|\n|  isrelativeto(self, *other)\n|      Return True if the path is relative to another path or False.\n|\n|  isreserved(self)\n|      Return True if the path contains one of the special names reserved\n|      by the system, if any.\n|\n|  joinpath(self, *args)\n|      Combine this path with one or several arguments, and return a\n|      new path representing either a subpath (if all arguments are relative\n|      paths) or a totally different path (if one of the arguments is\n|      anchored).\n|\n|  match(self, pathpattern)\n|      Return True if this path matches the given pattern.\n|\n|  relativeto(self, *other)\n|      Return the relative path to another path identified by the passed\n|      arguments.  If the operation is not possible (because this is not\n|      a subpath of the other path), raise ValueError.\n|\n|  withname(self, name)\n|      Return a new path with the file name changed.\n|\n|  withstem(self, stem)\n|      Return a new path with the stem changed.\n|\n|  withsuffix(self, suffix)\n|      Return a new path with the file suffix changed.  If the path\n|      has no suffix, add given suffix.  If the given suffix is an empty\n|      string, remove the suffix from the path.\n|\n|  ----------------------------------------------------------------------\n|  Class methods inherited from PurePath:\n|\n|  classgetitem(type) from builtins.type\n|\n|  ----------------------------------------------------------------------\n|  Readonly properties inherited from PurePath:\n|\n|  anchor\n|      The concatenation of the drive and root, or ''.\n|\n|  drive\n|      The drive prefix (letter or UNC path), if any.\n|\n|  name\n|      The final path component, if any.\n|\n|  parent\n|      The logical parent of the path.\n|\n|  parents\n|      A sequence of this path's logical parents.\n|\n|  parts\n|      An object providing sequence-like access to the\n|      components in the filesystem path.\n|\n|  root\n|      The root of the path, if any.\n|\n|  stem\n|      The final path component, minus its last suffix.\n|\n|  suffix\n|      The final component's last suffix, if any.\n|\n|      This includes the leading period. For example: '.txt'\n|\n|  suffixes\n|      A list of the final component's suffixes, if any.\n|\n|      These include the leading periods. For example: ['.tar', '.gz']\n"
                },
                {
                    "name": "class PurePath",
                    "content": "|  PurePath(*args)\n|\n|  Base class for manipulating paths without I/O.\n|\n|  PurePath represents a filesystem path and offers operations which\n|  don't imply any actual filesystem I/O.  Depending on your system,\n|  instantiating a PurePath will return either a PurePosixPath or a\n|  PureWindowsPath object.  You can also instantiate either of these classes\n|  directly, regardless of your system.\n|\n|  Methods defined here:\n|\n|  bytes(self)\n|      Return the bytes representation of the path.  This is only\n|      recommended to use under Unix.\n|\n|  eq(self, other)\n|      Return self==value.\n|\n|  fspath(self)\n|\n|  ge(self, other)\n|      Return self>=value.\n|\n|  gt(self, other)\n|      Return self>value.\n|\n|  hash(self)\n|      Return hash(self).\n|\n|  le(self, other)\n|      Return self<=value.\n|\n|  lt(self, other)\n|      Return self<value.\n|\n|  reduce(self)\n|      Helper for pickle.\n|\n|  repr(self)\n|      Return repr(self).\n|\n|  rtruediv(self, key)\n|\n|  str(self)\n|      Return the string representation of the path, suitable for\n|      passing to system calls.\n|\n|  truediv(self, key)\n|\n|  asposix(self)\n|      Return the string representation of the path with forward (/)\n|      slashes.\n|\n|  asuri(self)\n|      Return the path as a 'file' URI.\n|\n|  isabsolute(self)\n|      True if the path is absolute (has both a root and, if applicable,\n|      a drive).\n|\n|  isrelativeto(self, *other)\n|      Return True if the path is relative to another path or False.\n|\n|  isreserved(self)\n|      Return True if the path contains one of the special names reserved\n|      by the system, if any.\n|\n|  joinpath(self, *args)\n|      Combine this path with one or several arguments, and return a\n|      new path representing either a subpath (if all arguments are relative\n|      paths) or a totally different path (if one of the arguments is\n|      anchored).\n|\n|  match(self, pathpattern)\n|      Return True if this path matches the given pattern.\n|\n|  relativeto(self, *other)\n|      Return the relative path to another path identified by the passed\n|      arguments.  If the operation is not possible (because this is not\n|      a subpath of the other path), raise ValueError.\n|\n|  withname(self, name)\n|      Return a new path with the file name changed.\n|\n|  withstem(self, stem)\n|      Return a new path with the stem changed.\n|\n|  withsuffix(self, suffix)\n|      Return a new path with the file suffix changed.  If the path\n|      has no suffix, add given suffix.  If the given suffix is an empty\n|      string, remove the suffix from the path.\n|\n|  ----------------------------------------------------------------------\n|  Class methods defined here:\n|\n|  classgetitem(type) from builtins.type\n|\n|  ----------------------------------------------------------------------\n|  Static methods defined here:\n|\n|  new(cls, *args)\n|      Construct a PurePath from one or several strings and or existing\n|      PurePath objects.  The strings and path objects are combined so as\n|      to yield a canonicalized path, which is incorporated into the\n|      new PurePath object.\n|\n|  ----------------------------------------------------------------------\n|  Readonly properties defined here:\n|\n|  anchor\n|      The concatenation of the drive and root, or ''.\n|\n|  drive\n|      The drive prefix (letter or UNC path), if any.\n|\n|  name\n|      The final path component, if any.\n|\n|  parent\n|      The logical parent of the path.\n|\n|  parents\n|      A sequence of this path's logical parents.\n|\n|  parts\n|      An object providing sequence-like access to the\n|      components in the filesystem path.\n|\n|  root\n|      The root of the path, if any.\n|\n|  stem\n|      The final path component, minus its last suffix.\n|\n|  suffix\n|      The final component's last suffix, if any.\n|\n|      This includes the leading period. For example: '.txt'\n|\n|  suffixes\n|      A list of the final component's suffixes, if any.\n|\n|      These include the leading periods. For example: ['.tar', '.gz']\n"
                },
                {
                    "name": "class PurePosixPath",
                    "content": "|  PurePosixPath(*args)\n|\n|  PurePath subclass for non-Windows systems.\n|\n|  On a POSIX system, instantiating a PurePath should return this object.\n|  However, you can also instantiate it directly on any system.\n|\n|  Method resolution order:\n|      PurePosixPath\n|      PurePath\n|      builtins.object\n|\n|  Methods inherited from PurePath:\n|\n|  bytes(self)\n|      Return the bytes representation of the path.  This is only\n|      recommended to use under Unix.\n|\n|  eq(self, other)\n|      Return self==value.\n|\n|  fspath(self)\n|\n|  ge(self, other)\n|      Return self>=value.\n|\n|  gt(self, other)\n|      Return self>value.\n|\n|  hash(self)\n|      Return hash(self).\n|\n|  le(self, other)\n|      Return self<=value.\n|\n|  lt(self, other)\n|      Return self<value.\n|\n|  reduce(self)\n|      Helper for pickle.\n|\n|  repr(self)\n|      Return repr(self).\n|\n|  rtruediv(self, key)\n|\n|  str(self)\n|      Return the string representation of the path, suitable for\n|      passing to system calls.\n|\n|  truediv(self, key)\n|\n|  asposix(self)\n|      Return the string representation of the path with forward (/)\n|      slashes.\n|\n|  asuri(self)\n|      Return the path as a 'file' URI.\n|\n|  isabsolute(self)\n|      True if the path is absolute (has both a root and, if applicable,\n|      a drive).\n|\n|  isrelativeto(self, *other)\n|      Return True if the path is relative to another path or False.\n|\n|  isreserved(self)\n|      Return True if the path contains one of the special names reserved\n|      by the system, if any.\n|\n|  joinpath(self, *args)\n|      Combine this path with one or several arguments, and return a\n|      new path representing either a subpath (if all arguments are relative\n|      paths) or a totally different path (if one of the arguments is\n|      anchored).\n|\n|  match(self, pathpattern)\n|      Return True if this path matches the given pattern.\n|\n|  relativeto(self, *other)\n|      Return the relative path to another path identified by the passed\n|      arguments.  If the operation is not possible (because this is not\n|      a subpath of the other path), raise ValueError.\n|\n|  withname(self, name)\n|      Return a new path with the file name changed.\n|\n|  withstem(self, stem)\n|      Return a new path with the stem changed.\n|\n|  withsuffix(self, suffix)\n|      Return a new path with the file suffix changed.  If the path\n|      has no suffix, add given suffix.  If the given suffix is an empty\n|      string, remove the suffix from the path.\n|\n|  ----------------------------------------------------------------------\n|  Class methods inherited from PurePath:\n|\n|  classgetitem(type) from builtins.type\n|\n|  ----------------------------------------------------------------------\n|  Static methods inherited from PurePath:\n|\n|  new(cls, *args)\n|      Construct a PurePath from one or several strings and or existing\n|      PurePath objects.  The strings and path objects are combined so as\n|      to yield a canonicalized path, which is incorporated into the\n|      new PurePath object.\n|\n|  ----------------------------------------------------------------------\n|  Readonly properties inherited from PurePath:\n|\n|  anchor\n|      The concatenation of the drive and root, or ''.\n|\n|  drive\n|      The drive prefix (letter or UNC path), if any.\n|\n|  name\n|      The final path component, if any.\n|\n|  parent\n|      The logical parent of the path.\n|\n|  parents\n|      A sequence of this path's logical parents.\n|\n|  parts\n|      An object providing sequence-like access to the\n|      components in the filesystem path.\n|\n|  root\n|      The root of the path, if any.\n|\n|  stem\n|      The final path component, minus its last suffix.\n|\n|  suffix\n|      The final component's last suffix, if any.\n|\n|      This includes the leading period. For example: '.txt'\n|\n|  suffixes\n|      A list of the final component's suffixes, if any.\n|\n|      These include the leading periods. For example: ['.tar', '.gz']\n"
                },
                {
                    "name": "class PureWindowsPath",
                    "content": "|  PureWindowsPath(*args)\n|\n|  PurePath subclass for Windows systems.\n|\n|  On a Windows system, instantiating a PurePath should return this object.\n|  However, you can also instantiate it directly on any system.\n|\n|  Method resolution order:\n|      PureWindowsPath\n|      PurePath\n|      builtins.object\n|\n|  Methods inherited from PurePath:\n|\n|  bytes(self)\n|      Return the bytes representation of the path.  This is only\n|      recommended to use under Unix.\n|\n|  eq(self, other)\n|      Return self==value.\n|\n|  fspath(self)\n|\n|  ge(self, other)\n|      Return self>=value.\n|\n|  gt(self, other)\n|      Return self>value.\n|\n|  hash(self)\n|      Return hash(self).\n|\n|  le(self, other)\n|      Return self<=value.\n|\n|  lt(self, other)\n|      Return self<value.\n|\n|  reduce(self)\n|      Helper for pickle.\n|\n|  repr(self)\n|      Return repr(self).\n|\n|  rtruediv(self, key)\n|\n|  str(self)\n|      Return the string representation of the path, suitable for\n|      passing to system calls.\n|\n|  truediv(self, key)\n|\n|  asposix(self)\n|      Return the string representation of the path with forward (/)\n|      slashes.\n|\n|  asuri(self)\n|      Return the path as a 'file' URI.\n|\n|  isabsolute(self)\n|      True if the path is absolute (has both a root and, if applicable,\n|      a drive).\n|\n|  isrelativeto(self, *other)\n|      Return True if the path is relative to another path or False.\n|\n|  isreserved(self)\n|      Return True if the path contains one of the special names reserved\n|      by the system, if any.\n|\n|  joinpath(self, *args)\n|      Combine this path with one or several arguments, and return a\n|      new path representing either a subpath (if all arguments are relative\n|      paths) or a totally different path (if one of the arguments is\n|      anchored).\n|\n|  match(self, pathpattern)\n|      Return True if this path matches the given pattern.\n|\n|  relativeto(self, *other)\n|      Return the relative path to another path identified by the passed\n|      arguments.  If the operation is not possible (because this is not\n|      a subpath of the other path), raise ValueError.\n|\n|  withname(self, name)\n|      Return a new path with the file name changed.\n|\n|  withstem(self, stem)\n|      Return a new path with the stem changed.\n|\n|  withsuffix(self, suffix)\n|      Return a new path with the file suffix changed.  If the path\n|      has no suffix, add given suffix.  If the given suffix is an empty\n|      string, remove the suffix from the path.\n|\n|  ----------------------------------------------------------------------\n|  Class methods inherited from PurePath:\n|\n|  classgetitem(type) from builtins.type\n|\n|  ----------------------------------------------------------------------\n|  Static methods inherited from PurePath:\n|\n|  new(cls, *args)\n|      Construct a PurePath from one or several strings and or existing\n|      PurePath objects.  The strings and path objects are combined so as\n|      to yield a canonicalized path, which is incorporated into the\n|      new PurePath object.\n|\n|  ----------------------------------------------------------------------\n|  Readonly properties inherited from PurePath:\n|\n|  anchor\n|      The concatenation of the drive and root, or ''.\n|\n|  drive\n|      The drive prefix (letter or UNC path), if any.\n|\n|  name\n|      The final path component, if any.\n|\n|  parent\n|      The logical parent of the path.\n|\n|  parents\n|      A sequence of this path's logical parents.\n|\n|  parts\n|      An object providing sequence-like access to the\n|      components in the filesystem path.\n|\n|  root\n|      The root of the path, if any.\n|\n|  stem\n|      The final path component, minus its last suffix.\n|\n|  suffix\n|      The final component's last suffix, if any.\n|\n|      This includes the leading period. For example: '.txt'\n|\n|  suffixes\n|      A list of the final component's suffixes, if any.\n|\n|      These include the leading periods. For example: ['.tar', '.gz']\n"
                },
                {
                    "name": "class WindowsPath",
                    "content": "|  WindowsPath(*args, kwargs)\n|\n|  Path subclass for Windows systems.\n|\n|  On a Windows system, instantiating a Path should return this object.\n|\n|  Method resolution order:\n|      WindowsPath\n|      Path\n|      PureWindowsPath\n|      PurePath\n|      builtins.object\n|\n|  Methods defined here:\n|\n|  ismount(self)\n|      Check if this path is a POSIX mount point\n|\n|  ----------------------------------------------------------------------\n|  Methods inherited from Path:\n|\n|  enter(self)\n|\n|  exit(self, t, v, tb)\n|\n|  absolute(self)\n|      Return an absolute version of this path.  This function works\n|      even if the path doesn't point to anything.\n|\n|      No normalization is done, i.e. all '.' and '..' will be kept along.\n|      Use resolve() to get the canonical path to a file.\n|\n|  chmod(self, mode, *, followsymlinks=True)\n|      Change the permissions of the path, like os.chmod().\n|\n|  exists(self)\n|      Whether this path exists.\n|\n|  expanduser(self)\n|      Return a new path with expanded ~ and ~user constructs\n|      (as returned by os.path.expanduser)\n|\n|  glob(self, pattern)\n|      Iterate over this subtree and yield all existing files (of any\n|      kind, including directories) matching the given relative pattern.\n|\n|  group(self)\n|      Return the group name of the file gid.\n|\n|  hardlinkto(self, target)\n|      Make this path a hard link pointing to the same file as *target*.\n|\n|      Note the order of arguments (self, target) is the reverse of os.link's.\n|\n|  isblockdevice(self)\n|      Whether this path is a block device.\n|\n|  ischardevice(self)\n|      Whether this path is a character device.\n|\n|  isdir(self)\n|      Whether this path is a directory.\n|\n|  isfifo(self)\n|      Whether this path is a FIFO.\n|\n|  isfile(self)\n|      Whether this path is a regular file (also True for symlinks pointing\n|      to regular files).\n|\n|  issocket(self)\n|      Whether this path is a socket.\n|\n|  issymlink(self)\n|      Whether this path is a symbolic link.\n|\n|  iterdir(self)\n|      Iterate over the files in this directory.  Does not yield any\n|      result for the special paths '.' and '..'.\n|\n|  lchmod(self, mode)\n|      Like chmod(), except if the path points to a symlink, the symlink's\n|      permissions are changed, rather than its target's.\n|\n|  linkto(self, target)\n|      Make the target path a hard link pointing to this path.\n|\n|      Note this function does not make this path a hard link to *target*,\n|      despite the implication of the function and argument names. The order\n|      of arguments (target, link) is the reverse of Path.symlinkto, but\n|      matches that of os.link.\n|\n|      Deprecated since Python 3.10 and scheduled for removal in Python 3.12.\n|      Use `hardlinkto()` instead.\n|\n|  lstat(self)\n|      Like stat(), except if the path points to a symlink, the symlink's\n|      status information is returned, rather than its target's.\n|\n|  mkdir(self, mode=511, parents=False, existok=False)\n|      Create a new directory at this given path.\n|\n|  open(self, mode='r', buffering=-1, encoding=None, errors=None, newline=None)\n|      Open the file pointed by this path and return a file object, as\n|      the built-in open() function does.\n|\n|  owner(self)\n|      Return the login name of the file owner.\n|\n|  readbytes(self)\n|      Open the file in bytes mode, read it, and close the file.\n|\n|  readtext(self, encoding=None, errors=None)\n|      Open the file in text mode, read it, and close the file.\n|\n|  readlink(self)\n|      Return the path to which the symbolic link points.\n|\n|  rename(self, target)\n|      Rename this path to the target path.\n|\n|      The target path may be absolute or relative. Relative paths are\n|      interpreted relative to the current working directory, *not* the\n|      directory of the Path object.\n|\n|      Returns the new Path instance pointing to the target path.\n|\n|  replace(self, target)\n|      Rename this path to the target path, overwriting if that path exists.\n|\n|      The target path may be absolute or relative. Relative paths are\n|      interpreted relative to the current working directory, *not* the\n|      directory of the Path object.\n|\n|      Returns the new Path instance pointing to the target path.\n|\n|  resolve(self, strict=False)\n|      Make the path absolute, resolving all symlinks on the way and also\n|      normalizing it (for example turning slashes into backslashes under\n|      Windows).\n|\n|  rglob(self, pattern)\n|      Recursively yield all existing files (of any kind, including\n|      directories) matching the given relative pattern, anywhere in\n|      this subtree.\n|\n|  rmdir(self)\n|      Remove this directory.  The directory must be empty.\n|\n|  samefile(self, otherpath)\n|      Return whether otherpath is the same or not as this file\n|      (as returned by os.path.samefile()).\n|\n|  stat(self, *, followsymlinks=True)\n|      Return the result of the stat() system call on this path, like\n|      os.stat() does.\n|\n|  symlinkto(self, target, targetisdirectory=False)\n|      Make this path a symlink pointing to the target path.\n|      Note the order of arguments (link, target) is the reverse of os.symlink.\n|\n|  touch(self, mode=438, existok=True)\n|      Create this file with the given access mode, if it doesn't exist.\n|\n|  unlink(self, missingok=False)\n|      Remove this file or link.\n|      If the path is a directory, use rmdir() instead.\n|\n|  writebytes(self, data)\n|      Open the file in bytes mode, write to it, and close the file.\n|\n|  writetext(self, data, encoding=None, errors=None, newline=None)\n|      Open the file in text mode, write to it, and close the file.\n|\n|  ----------------------------------------------------------------------\n|  Class methods inherited from Path:\n|\n|  cwd() from builtins.type\n|      Return a new path pointing to the current working directory\n|      (as returned by os.getcwd()).\n|\n|  home() from builtins.type\n|      Return a new path pointing to the user's home directory (as\n|      returned by os.path.expanduser('~')).\n|\n|  ----------------------------------------------------------------------\n|  Static methods inherited from Path:\n|\n|  new(cls, *args, kwargs)\n|      Construct a PurePath from one or several strings and or existing\n|      PurePath objects.  The strings and path objects are combined so as\n|      to yield a canonicalized path, which is incorporated into the\n|      new PurePath object.\n|\n|  ----------------------------------------------------------------------\n|  Methods inherited from PurePath:\n|\n|  bytes(self)\n|      Return the bytes representation of the path.  This is only\n|      recommended to use under Unix.\n|\n|  eq(self, other)\n|      Return self==value.\n|\n|  fspath(self)\n|\n|  ge(self, other)\n|      Return self>=value.\n|\n|  gt(self, other)\n|      Return self>value.\n|\n|  hash(self)\n|      Return hash(self).\n|\n|  le(self, other)\n|      Return self<=value.\n|\n|  lt(self, other)\n|      Return self<value.\n|\n|  reduce(self)\n|      Helper for pickle.\n|\n|  repr(self)\n|      Return repr(self).\n|\n|  rtruediv(self, key)\n|\n|  str(self)\n|      Return the string representation of the path, suitable for\n|      passing to system calls.\n|\n|  truediv(self, key)\n|\n|  asposix(self)\n|      Return the string representation of the path with forward (/)\n|      slashes.\n|\n|  asuri(self)\n|      Return the path as a 'file' URI.\n|\n|  isabsolute(self)\n|      True if the path is absolute (has both a root and, if applicable,\n|      a drive).\n|\n|  isrelativeto(self, *other)\n|      Return True if the path is relative to another path or False.\n|\n|  isreserved(self)\n|      Return True if the path contains one of the special names reserved\n|      by the system, if any.\n|\n|  joinpath(self, *args)\n|      Combine this path with one or several arguments, and return a\n|      new path representing either a subpath (if all arguments are relative\n|      paths) or a totally different path (if one of the arguments is\n|      anchored).\n|\n|  match(self, pathpattern)\n|      Return True if this path matches the given pattern.\n|\n|  relativeto(self, *other)\n|      Return the relative path to another path identified by the passed\n|      arguments.  If the operation is not possible (because this is not\n|      a subpath of the other path), raise ValueError.\n|\n|  withname(self, name)\n|      Return a new path with the file name changed.\n|\n|  withstem(self, stem)\n|      Return a new path with the stem changed.\n|\n|  withsuffix(self, suffix)\n|      Return a new path with the file suffix changed.  If the path\n|      has no suffix, add given suffix.  If the given suffix is an empty\n|      string, remove the suffix from the path.\n|\n|  ----------------------------------------------------------------------\n|  Class methods inherited from PurePath:\n|\n|  classgetitem(type) from builtins.type\n|\n|  ----------------------------------------------------------------------\n|  Readonly properties inherited from PurePath:\n|\n|  anchor\n|      The concatenation of the drive and root, or ''.\n|\n|  drive\n|      The drive prefix (letter or UNC path), if any.\n|\n|  name\n|      The final path component, if any.\n|\n|  parent\n|      The logical parent of the path.\n|\n|  parents\n|      A sequence of this path's logical parents.\n|\n|  parts\n|      An object providing sequence-like access to the\n|      components in the filesystem path.\n|\n|  root\n|      The root of the path, if any.\n|\n|  stem\n|      The final path component, minus its last suffix.\n|\n|  suffix\n|      The final component's last suffix, if any.\n|\n|      This includes the leading period. For example: '.txt'\n|\n|  suffixes\n|      A list of the final component's suffixes, if any.\n|\n|      These include the leading periods. For example: ['.tar', '.gz']\n"
                }
            ]
        },
        "DATA": {
            "content": "all = ['PurePath', 'PurePosixPath', 'PureWindowsPath', 'Path', 'Po...\n",
            "subsections": []
        },
        "FILE": {
            "content": "/usr/lib/python3.10/pathlib.py\n\n",
            "subsections": []
        }
    },
    "summary": "pathlib",
    "flags": [],
    "examples": [],
    "see_also": []
}