MCPcopy
hub / github.com/Delgan/loguru / compression

Method compression

loguru/_file_sink.py:58–67  ·  view source on GitHub ↗
(path_in, ext, compress_function)

Source from the content-addressed store, hash-verified

56
57 @staticmethod
58 def compression(path_in, ext, compress_function):
59 path_out = "{}{}".format(path_in, ext)
60
61 if os.path.exists(path_out):
62 creation_time = get_ctime(path_out)
63 root, ext_before = os.path.splitext(path_in)
64 renamed_path = generate_rename_path(root, ext_before + ext, creation_time)
65 os.rename(path_out, renamed_path)
66 compress_function(path_in, path_out)
67 os.remove(path_in)
68
69
70class Retention:

Callers

nothing calls this directly

Calls 2

generate_rename_pathFunction · 0.85
removeMethod · 0.80

Tested by

no test coverage detected