Name Description Size
__init__.py 484
fs.py File system utilities, copied from mozfile. 3687
manager.py Download is reponsible of downloading one file in the background. Example of use: :: dl = Download(url, dest) dl.start() dl.wait() # this will block until completion / cancel / error If a download fail or is canceled, the temporary dest is removed from the disk. Usually, Downloads are created by using :meth:`DownloadManager.download`. :param url: the url of the file to download :param dest: the local file path destination :param finished_callback: a callback that will be called in the thread when the thread work is done. Takes the download instance as a parameter. :param chunk_size: size of the chunk that will be read. The thread can not be stopped while we are reading that chunk size. :param session: a requests.Session instance that will do do the real downloading work. If None, `requests` module is used. :param progress: A callable to report the progress (default to None). see :meth:`set_progress`. 11295
persist_limit.py Keep a list of files, removing the oldest ones when the size_limit is reached. The access time of a file is used to determine the oldests, e.g. the last time a file was read. :param size_limit: the size limit in bytes. A value of 0 means no limit. :param file_limit: even if the size limit is reached, this force to keep at least *file_limit* files. 1990