24 lines
648 B
Python
24 lines
648 B
Python
"""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
|