

def exists(self, filename, type='file'):
    file_path = os.path.join(self.build_dir, filename)
    if (type == 'file'):
        return os.path.isfile(file_path)
    elif (type == 'dir'):
        return os.path.isdir(file_path)
    elif (type == 'link'):
        return os.path.islink(file_path)
    else:
        raise Exception('invalid type specified')

dataset/ETHPy150Open fgimian/flaskage/tests/test_scaffold.py TestScaffold.exists/original