

def locate(self, file):
    while (not self.exists(self.currentFolder, file)):
        debug_msg(('looking for %s in %s' % (file, self.currentFolder)))
        self.currentFolder = os.path.dirname(self.currentFolder)
        if ('/' == self.currentFolder):
            raise Exception(("Could not find '%s'. I started at %s and went all the way up to the root folder" % (file, self.baseFolder)))
        return self.locate(file)
    debug_msg(('found file in %s' % self.currentFolder))
    return self.currentFolder

dataset/ETHPy150Open francodacosta/composer-sublime/composer.py FolderLocator.locate/original