判断目录是否为:目录:
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.