You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
When I move files, I want the file creation and modified time to be preserved. Currently there is no option to do that.
Describe the solution you'd like
I want to be able to specify that a move action should preserve the modified time on files
Describe alternatives you've considered
There are none
Additional context
The code is already in place to preserve the mtime on file move, but it is off by default and there is no way to enable it via config.yaml.
(See organize/actions/move.py)
# this is taken from my PR
def move_file_optimized(
src_fs,
src_path,
dst_fs,
dst_path,
preserve_time=False,
cleanup_dst_on_error=True,
):
# type: (...) -> None
"""Move a file from one filesystem to another.
Arguments:
src_fs (FS or str): Source filesystem (instance or URL).
src_path (str): Path to a file on ``src_fs``.
dst_fs (FS or str): Destination filesystem (instance or URL).
dst_path (str): Path to a file on ``dst_fs``.
preserve_time (bool): If `True`, try to preserve mtime of the
resources (defaults to `False`).
cleanup_dst_on_error (bool): If `True`, tries to delete the file copied to
``dst_fs`` if deleting the file from ``src_fs`` fails (defaults to `True`).
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
When I move files, I want the file creation and modified time to be preserved. Currently there is no option to do that.
Describe the solution you'd like
I want to be able to specify that a move action should preserve the modified time on files
Describe alternatives you've considered
There are none
Additional context
The code is already in place to preserve the mtime on file move, but it is off by default and there is no way to enable it via config.yaml.
(See organize/actions/move.py)
The text was updated successfully, but these errors were encountered: