(path_in, ext, compress_function)
| 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 | |
| 70 | class Retention: |
nothing calls this directly
no test coverage detected