| 1 | os.path.abspath(path) | 
|  | 返回路径 path规范化的绝对版本。 | 
| 2 | os.path.basename(path) | 
|  | 返回路径 path的基本名称。 | 
| 3 | os.path.commonprefix(list) | 
|  | 返回最长的路径前缀(逐字符地),该前缀是 list中所有路径的前缀。 | 
| 4 | os.path.dirname(path) | 
|  | 返回路径 path的目录名称。 | 
| 5 | os.path.exists(path) | 
|  | 如果路径 path是现有路径则返回True。对于损坏的符号链接返回False。 | 
| 6 | os.path.lexists(path) | 
|  | 如果路径 path是现有路径则返回True。对于损坏的符号链接也返回True。 | 
| 7 | os.path.expanduser(path) | 
|  | 在 Unix 和 Windows 上,返回带有初始部分为 ~或~user的参数替换为用户的家目录的结果。 | 
| 8 | os.path.expandvars(path) | 
|  | 返回带有环境变量展开的参数。 | 
| 9 | os.path.getatime(path) | 
|  | 返回路径 path的最后访问时间。 | 
| 10 | os.path.getmtime(path) | 
|  | 返回路径 path的最后修改时间。 | 
| 11 | os.path.getctime(path) | 
|  | 返回系统的 ctime,在某些系统(如 Unix)上,这是最后一次更改的时间,在其他系统(如 Windows)上,则是路径path的创建时间。 | 
| 12 | os.path.getsize(path) | 
|  | 返回路径 path的大小(以字节为单位)。 | 
| 13 | os.path.isabs(path) | 
|  | 如果路径 path是绝对路径名则返回True。 | 
| 14 | os.path.isfile(path) | 
|  | 如果路径 path是现有普通文件则返回True。 | 
| 15 | os.path.isdir(path) | 
|  | 如果路径 path是现有目录则返回True。 | 
| 16 | os.path.islink(path) | 
|  | 如果路径 path是指向目录条目的符号链接则返回True。 | 
| 17 | os.path.ismount(path) | 
|  | 如果路径名 path是挂载点则返回True:这是文件系统中的一个点,在这里挂载了一个不同的文件系统。 | 
| 18 | os.path.join(path1[, path2[, ...]]) | 
|  | 智能地合并一个或多个路径组件。 | 
| 19 | os.path.normcase(path) | 
|  | 规范化路径名的大小写。 | 
| 20 | os.path.normpath(path) | 
|  | 规范化路径名。 | 
| 21 | os.path.realpath(path) | 
|  | 返回指定文件名的规范路径,消除路径中遇到的任何符号链接。 | 
| 22 | os.path.relpath(path[, start]) | 
|  | 返回相对于当前目录或可选起始点的路径 path的相对文件路径。 | 
| 23 | os.path.samefile(path1, path2) | 
|  | 如果两个路径名参数指向同一个文件或目录则返回 True。 | 
| 24 | os.path.sameopenfile(fp1, fp2) | 
|  | 如果文件描述符 fp1和fp2指向同一个文件则返回True。 | 
| 25 | os.path.samestat(stat1, stat2) | 
|  | 如果统计元组 stat1和stat2指向同一个文件则返回True。 | 
| 26 | os.path.split(path) | 
|  | 将路径 path分割成一个二元组(head, tail),其中tail是最后一个路径名组件,而head是其前导部分。 | 
| 27 | os.path.splitdrive(path) | 
|  | 将路径 path分割成一个二元组(drive, tail),其中drive要么是一个驱动器规格要么是一个空字符串。 | 
| 28 | os.path.splitext(path) | 
|  | 将路径 path分割成一个二元组(root, ext)使得root + ext == path,且ext是空或者以一个点开始并包含最多一个点。 | 
| 29 | os.path.walk(path, visit, arg) | 
|  | 对以路径 path为根的目录树中的每个目录(包括路径自身,如果它是一个目录的话),调用函数visit并传入参数(arg, dirname, names)。 |