{
    "mode": "pydoc",
    "parameter": "posixpath",
    "section": "",
    "url": "https://www.chedong.com/phpMan.php/pydoc/posixpath/json",
    "generated": "2026-06-02T15:04:27Z",
    "sections": {
        "NAME": {
            "content": "posixpath - Common operations on Posix pathnames.\n",
            "subsections": []
        },
        "MODULE REFERENCE": {
            "content": "https://docs.python.org/3.10/library/posixpath.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": []
        },
        "DESCRIPTION": {
            "content": "Instead of importing this module directly, import os and refer to\nthis module as os.path.  The \"os.path\" name is an alias for this\nmodule on Posix systems; on other systems (e.g. Windows),\nos.path provides the same operations in a manner specific to that\nplatform, and is an alias to another module (e.g. ntpath).\n\nSome of this can actually be useful on non-Posix systems too, e.g.\nfor manipulation of the pathname component of URLs.\n",
            "subsections": []
        },
        "FUNCTIONS": {
            "content": "",
            "subsections": [
                {
                    "name": "abspath",
                    "content": "Return an absolute path.\n"
                },
                {
                    "name": "basename",
                    "content": "Returns the final component of a pathname\n"
                },
                {
                    "name": "commonpath",
                    "content": "Given a sequence of path names, returns the longest common sub-path.\n"
                },
                {
                    "name": "commonprefix",
                    "content": "Given a list of pathnames, returns the longest common leading component\n"
                },
                {
                    "name": "dirname",
                    "content": "Returns the directory component of a pathname\n"
                },
                {
                    "name": "exists",
                    "content": "Test whether a path exists.  Returns False for broken symbolic links\n"
                },
                {
                    "name": "expanduser",
                    "content": "Expand ~ and ~user constructions.  If user or $HOME is unknown,\ndo nothing.\n"
                },
                {
                    "name": "expandvars",
                    "content": "Expand shell variables of form $var and ${var}.  Unknown variables\nare left unchanged.\n"
                },
                {
                    "name": "getatime",
                    "content": "Return the last access time of a file, reported by os.stat().\n"
                },
                {
                    "name": "getctime",
                    "content": "Return the metadata change time of a file, reported by os.stat().\n"
                },
                {
                    "name": "getmtime",
                    "content": "Return the last modification time of a file, reported by os.stat().\n"
                },
                {
                    "name": "getsize",
                    "content": "Return the size of a file, reported by os.stat().\n"
                },
                {
                    "name": "isabs",
                    "content": "Test whether a path is absolute\n"
                },
                {
                    "name": "isdir",
                    "content": "Return true if the pathname refers to an existing directory.\n"
                },
                {
                    "name": "isfile",
                    "content": "Test whether a path is a regular file\n"
                },
                {
                    "name": "islink",
                    "content": "Test whether a path is a symbolic link\n"
                },
                {
                    "name": "ismount",
                    "content": "Test whether a path is a mount point\n"
                },
                {
                    "name": "join",
                    "content": "Join two or more pathname components, inserting '/' as needed.\nIf any component is an absolute path, all previous path components\nwill be discarded.  An empty last part will result in a path that\nends with a separator.\n"
                },
                {
                    "name": "lexists",
                    "content": "Test whether a path exists.  Returns True for broken symbolic links\n"
                },
                {
                    "name": "normcase",
                    "content": "Normalize case of pathname.  Has no effect under Posix\n"
                },
                {
                    "name": "normpath",
                    "content": "Normalize path, eliminating double slashes, etc.\n"
                },
                {
                    "name": "realpath",
                    "content": "Return the canonical path of the specified filename, eliminating any\nsymbolic links encountered in the path.\n"
                },
                {
                    "name": "relpath",
                    "content": "Return a relative version of a path\n"
                },
                {
                    "name": "samefile",
                    "content": "Test whether two pathnames reference the same actual file or directory\n\nThis is determined by the device number and i-node number and\nraises an exception if an os.stat() call on either pathname fails.\n"
                },
                {
                    "name": "sameopenfile",
                    "content": "Test whether two open file objects reference the same file\n"
                },
                {
                    "name": "samestat",
                    "content": "Test whether two stat buffers reference the same file\n"
                },
                {
                    "name": "split",
                    "content": "Split a pathname.  Returns tuple \"(head, tail)\" where \"tail\" is\neverything after the final slash.  Either part may be empty.\n"
                },
                {
                    "name": "splitdrive",
                    "content": "Split a pathname into drive and path. On Posix, drive is always\nempty.\n"
                },
                {
                    "name": "splitext",
                    "content": "Split the extension from a pathname.\n\nExtension is everything from the last dot to the end, ignoring\nleading dots.  Returns \"(root, ext)\"; ext may be empty.\n"
                }
            ]
        },
        "DATA": {
            "content": "all = ['normcase', 'isabs', 'join', 'splitdrive', 'split', 'splite...\naltsep = None\ncurdir = '.'\ndefpath = '/bin:/usr/bin'\ndevnull = '/dev/null'\nextsep = '.'\npardir = '..'\npathsep = ':'\nsep = '/'\nsupportsunicodefilenames = False\n",
            "subsections": []
        },
        "FILE": {
            "content": "/usr/lib/python3.10/posixpath.py\n\n",
            "subsections": []
        }
    },
    "summary": "posixpath - Common operations on Posix pathnames.",
    "flags": [],
    "examples": [],
    "see_also": []
}