1
0
ScrapTheChan/scrapthechan/fileinfo.py

24 lines
648 B
Python
Raw Normal View History

2020-07-08 22:53:39 +04:00
"""FileInfo object stores all needed information about a file."""
__all__ = ["FileInfo"]
class FileInfo:
"""Stores all needed information about a file.
Arguments:
- `name` -- name of a file;
- `size` -- size of a file;
- `dlurl` -- full download URL for a file;
- `hash_value` -- hash sum of a file;
- `hash_algo` -- hash algorithm used (e.g. md5).
"""
def __init__(self, name: str, size: int, dlurl: str,
hash_value: str, hash_algo: str) -> None:
self.name = name
self.size = size
self.dlurl = dlurl
self.hash_value = hash_value
self.hash_algo = hash_algo