@@ -45,7 +45,14 @@ def copy_fs(
4545
4646 """
4747 return copy_dir (
48- src_fs , "/" , dst_fs , "/" , walker = walker , on_copy = on_copy , workers = workers
48+ src_fs ,
49+ "/" ,
50+ dst_fs ,
51+ "/" ,
52+ walker = walker ,
53+ on_copy = on_copy ,
54+ workers = workers ,
55+ preserve_time = preserve_time ,
4956 )
5057
5158
@@ -199,7 +206,8 @@ def copy_file_internal(
199206 with src_fs .openbin (src_path ) as read_file :
200207 dst_fs .upload (dst_path , read_file )
201208
202- copy_mtime (src_fs , src_path , dst_fs , dst_path )
209+ if preserve_time :
210+ copy_mtime (src_fs , src_path , dst_fs , dst_path )
203211
204212
205213def copy_file_if_newer (
@@ -262,7 +270,6 @@ def copy_structure(
262270 src_fs , # type: Union[FS, Text]
263271 dst_fs , # type: Union[FS, Text]
264272 walker = None , # type: Optional[Walker]
265- preserve_time = False , # type: bool
266273):
267274 # type: (...) -> None
268275 """Copy directories (but not files) from ``src_fs`` to ``dst_fs``.
@@ -273,8 +280,6 @@ def copy_structure(
273280 walker (~fs.walk.Walker, optional): A walker object that will be
274281 used to scan for files in ``src_fs``. Set this if you only
275282 want to consider a sub-set of the resources in ``src_fs``.
276- preserve_time (bool): If `True`, try to preserve mtime of the
277- resource (defaults to `False`).
278283
279284 """
280285 walker = walker or Walker ()
0 commit comments