MCPcopy Create free account
hub / github.com/s3tools/s3cmd / new_file

Method new_file

S3/Progress.py:28–42  ·  view source on GitHub ↗
(self, labels, total_size)

Source from the content-addressed store, hash-verified

26 self.new_file(labels, total_size)
27
28 def new_file(self, labels, total_size):
29 self.labels = labels
30 self.total_size = total_size
31 # Set initial_position to something in the
32 # case we're not counting from 0. For instance
33 # when appending to a partially downloaded file.
34 # Setting initial_position will let the speed
35 # be computed right.
36 self.initial_position = 0
37 self.current_position = self.initial_position
38 self.time_start = datetime.datetime.now()
39 self.time_last = self.time_start
40 self.time_current = self.time_start
41
42 self.display(new_file = True)
43
44 def update(self, current_position = -1, delta_position = -1):
45 self.time_last = self.time_current

Callers 1

__init__Method · 0.95

Calls 1

displayMethod · 0.95

Tested by

no test coverage detected