Lines Matching refs:mtime
135 compresslevel=_COMPRESS_LEVEL_BEST, fileobj=None, mtime=None):
163 The mtime argument is an optional numeric timestamp to be written
206 self._write_mtime = mtime
224 def mtime(self):
257 mtime = self._write_mtime
258 if mtime is None:
259 mtime = time.time()
260 write32u(self.fileobj, int(mtime))
421 Returns last mtime if header was present or None otherwise.
556 mtime = None) -> bytes:
560 :param mtime: The mtime (must support conversion to a 32-bit integer).
563 if mtime is None:
564 mtime = time.time()
572 # fields added to header), mtime, xfl and os (255 for unknown OS).
573 return struct.pack("<BBBBLBB", 0x1f, 0x8b, 8, 0, int(mtime), xfl, 255)
576 def compress(data, compresslevel=_COMPRESS_LEVEL_BEST, *, mtime=None):
580 mtime can be used to set the modification time. The modification time is
583 if mtime == 0:
584 # Use zlib as it creates the header with 0 mtime by default.
587 header = _create_simple_gzip_header(compresslevel, mtime)