判断目录是否为:目录:
os.path.isdir(path)
Return True if path is an existing directory. This follows symbolic links, so both islink() and
isdir() can be true for the same path.
判断目录是否为:文件:
os.path.isfile(path)
Return True if path is an existing regular file. This follows symbolic links, so both islink() and
isfile() can be true for the same path.
判断目录是否为:符号链接:
os.path.islink(path)
Return True if path refers to a directory entry that is a symbolic link. Always False if symbolic links are
not supported.