Example #1
0
def getUrls():
    urls = []
    for entry in os.listdir(STORAGE_PATH):
        path = os.path.join(STORAGE_PATH, entry, URL_BASENAME)
        if os.path.exists(path):
            fp = disk.fetchDataFile(path)
            urls.append(fp.read())
    return urls
Example #2
0
def load(path):
    fp = disk.fetchDataFile(path)
    map = cPickle.load(fp)
    fp.close()
    return map
Example #3
0
def _fetchDataFile(url, basename):
    path = _getStoragePath(url, basename)
    return disk.fetchDataFile(path)