@@ -56,7 +56,8 @@ def copy_fs_if_newer(
56
56
"""Copy the contents of one filesystem to another, checking times.
57
57
58
58
.. deprecated:: 2.5.0
59
- Use `~fs.copy_fs_if` with ``condition="newer"`` instead.
59
+ Use `~fs.copy.copy_fs_if` with ``condition="newer"`` instead.
60
+
60
61
"""
61
62
warnings .warn (
62
63
"copy_fs_if_newer is deprecated. Use copy_fs_if instead." , DeprecationWarning
@@ -75,28 +76,6 @@ def copy_fs_if(
75
76
# type: (...) -> None
76
77
"""Copy the contents of one filesystem to another, depending on a condition.
77
78
78
- Depending on the value of ``strategy``, certain conditions must be fulfilled
79
- for a file to be copied to ``dst_fs``. The following values
80
- are supported:
81
-
82
- ``"always"``
83
- The source file is always copied.
84
- ``"newer"``
85
- The last modification time of the source file must be newer than that
86
- of the destination file. If either file has no modification time, the
87
- copy is performed always.
88
- ``"older"``
89
- The last modification time of the source file must be older than that
90
- of the destination file. If either file has no modification time, the
91
- copy is performed always.
92
- ``"exists"``
93
- The source file is only copied if a file of the same path already
94
- exists in ``dst_fs``.
95
- ``"not_exists"``
96
- The source file is only copied if no file of the same path already
97
- exists in ``dst_fs``.
98
-
99
-
100
79
Arguments:
101
80
src_fs (FS or str): Source filesystem (URL or instance).
102
81
dst_fs (FS or str): Destination filesystem (URL or instance).
@@ -110,6 +89,10 @@ def copy_fs_if(
110
89
workers (int): Use ``worker`` threads to copy data, or ``0`` (default)
111
90
for a single-threaded copy.
112
91
92
+ See Also:
93
+ `~fs.copy.copy_file_if` for the full list of supported values for the
94
+ ``condition`` argument.
95
+
113
96
"""
114
97
return copy_dir_if (
115
98
src_fs ,
@@ -154,7 +137,8 @@ def copy_file_if_newer(
154
137
"""Copy a file from one filesystem to another, checking times.
155
138
156
139
.. deprecated:: 2.5.0
157
- Use `~fs.copy_file_if` with ``condition="newer"`` instead.
140
+ Use `~fs.copy.copy_file_if` with ``condition="newer"`` instead.
141
+
158
142
"""
159
143
warnings .warn (
160
144
"copy_file_if_newer is deprecated. Use copy_file_if instead." ,
@@ -173,9 +157,9 @@ def copy_file_if(
173
157
# type: (...) -> bool
174
158
"""Copy a file from one filesystem to another, depending on a condition.
175
159
176
- Depending on the value of ``strategy ``, certain conditions must be fulfilled
177
- for a file to be copied to ``dst_fs``. The following values
178
- are supported:
160
+ Depending on the value of ``condition ``, certain requirements must
161
+ be fulfilled for a file to be copied to ``dst_fs``. The following
162
+ values are supported:
179
163
180
164
``"always"``
181
165
The source file is always copied.
@@ -194,7 +178,6 @@ def copy_file_if(
194
178
The source file is only copied if no file of the same path already
195
179
exists in ``dst_fs``.
196
180
197
-
198
181
Arguments:
199
182
src_fs (FS or str): Source filesystem (instance or URL).
200
183
src_path (str): Path to a file on the source filesystem.
@@ -335,7 +318,8 @@ def copy_dir_if_newer(
335
318
"""Copy a directory from one filesystem to another, checking times.
336
319
337
320
.. deprecated:: 2.5.0
338
- Use `~fs.copy_dir_if` with ``condition="newer"`` instead.
321
+ Use `~fs.copy.copy_dir_if` with ``condition="newer"`` instead.
322
+
339
323
"""
340
324
warnings .warn (
341
325
"copy_dir_if_newer is deprecated. Use copy_dir_if instead." , DeprecationWarning
@@ -356,27 +340,6 @@ def copy_dir_if(
356
340
# type: (...) -> None
357
341
"""Copy a directory from one filesystem to another, depending on a condition.
358
342
359
- Depending on the value of ``strategy``, certain conditions must be
360
- fulfilled for a file to be copied to ``dst_fs``. The following values
361
- are supported:
362
-
363
- ``"always"``
364
- The source file is always copied.
365
- ``"newer"``
366
- The last modification time of the source file must be newer than that
367
- of the destination file. If either file has no modification time, the
368
- copy is performed always.
369
- ``"older"``
370
- The last modification time of the source file must be older than that
371
- of the destination file. If either file has no modification time, the
372
- copy is performed always.
373
- ``"exists"``
374
- The source file is only copied if a file of the same path already
375
- exists in ``dst_fs``.
376
- ``"not_exists"``
377
- The source file is only copied if no file of the same path already
378
- exists in ``dst_fs``.
379
-
380
343
Arguments:
381
344
src_fs (FS or str): Source filesystem (instance or URL).
382
345
src_path (str): Path to a directory on the source filesystem.
@@ -392,6 +355,10 @@ def copy_dir_if(
392
355
workers (int): Use ``worker`` threads to copy data, or ``0`` (default) for
393
356
a single-threaded copy.
394
357
358
+ See Also:
359
+ `~fs.copy.copy_file_if` for the full list of supported values for the
360
+ ``condition`` argument.
361
+
395
362
"""
396
363
on_copy = on_copy or (lambda * args : None )
397
364
walker = walker or Walker ()
0 commit comments