-
Notifications
You must be signed in to change notification settings - Fork 0
/
status.py
40 lines (30 loc) · 1.13 KB
/
status.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# Generic status class. All other status classes must inherit this class
class Status:
def progress(self):
"""
Calculates the progress of the mirror (upload or download)
:return: progress in percentage
"""
raise NotImplementedError
def speed(self):
""":return: speed in bytes per second"""
raise NotImplementedError
def name(self):
""":return name of file/directory being processed"""
raise NotImplementedError
def path(self):
""":return path of the file/directory"""
raise NotImplementedError
def size(self):
""":return Size of file folder"""
raise NotImplementedError
def eta(self):
""":return ETA of the process to complete"""
raise NotImplementedError
def status(self):
""":return String describing what is the object of this class will be tracking (upload/download/something
else) """
raise NotImplementedError
def processed_bytes(self):
""":return The size of file that has been processed (downloaded/uploaded/archived)"""
raise NotImplementedError