def directory_exists(path):
    return os.path.isdir(os.path.expanduser(path))
Tests to see if path is a valid directory.  Returns True/False.
dataset/ETHPy150Open saltstack/salt/salt/modules/file.py/directory_exists