summaryrefslogtreecommitdiff
path: root/setuptools/utils.py
blob: 080b9a8e238ab810d68e4decf9ba7a054227f5ad (plain)
1
2
3
4
5
6
7
8
9
10
11
import os
import os.path


def cs_path_exists(fspath):
    if not os.path.exists(fspath):
        return False
    # make absolute so we always have a directory
    abspath = os.path.abspath(fspath)
    directory, filename = os.path.split(abspath)
    return filename in os.listdir(directory)