rclone-api 1.0.47__tar.gz → 1.0.48__tar.gz
Sign up to get free protection for your applications and to get access to all the features.
- {rclone_api-1.0.47 → rclone_api-1.0.48}/PKG-INFO +1 -1
- {rclone_api-1.0.47 → rclone_api-1.0.48}/pyproject.toml +1 -1
- {rclone_api-1.0.47 → rclone_api-1.0.48}/src/rclone_api/rclone.py +28 -10
- {rclone_api-1.0.47 → rclone_api-1.0.48}/src/rclone_api.egg-info/PKG-INFO +1 -1
- {rclone_api-1.0.47 → rclone_api-1.0.48}/.aiderignore +0 -0
- {rclone_api-1.0.47 → rclone_api-1.0.48}/.github/workflows/lint.yml +0 -0
- {rclone_api-1.0.47 → rclone_api-1.0.48}/.github/workflows/push_macos.yml +0 -0
- {rclone_api-1.0.47 → rclone_api-1.0.48}/.github/workflows/push_ubuntu.yml +0 -0
- {rclone_api-1.0.47 → rclone_api-1.0.48}/.github/workflows/push_win.yml +0 -0
- {rclone_api-1.0.47 → rclone_api-1.0.48}/.gitignore +0 -0
- {rclone_api-1.0.47 → rclone_api-1.0.48}/.pylintrc +0 -0
- {rclone_api-1.0.47 → rclone_api-1.0.48}/.vscode/launch.json +0 -0
- {rclone_api-1.0.47 → rclone_api-1.0.48}/.vscode/settings.json +0 -0
- {rclone_api-1.0.47 → rclone_api-1.0.48}/.vscode/tasks.json +0 -0
- {rclone_api-1.0.47 → rclone_api-1.0.48}/LICENSE +0 -0
- {rclone_api-1.0.47 → rclone_api-1.0.48}/MANIFEST.in +0 -0
- {rclone_api-1.0.47 → rclone_api-1.0.48}/README.md +0 -0
- {rclone_api-1.0.47 → rclone_api-1.0.48}/clean +0 -0
- {rclone_api-1.0.47 → rclone_api-1.0.48}/install +0 -0
- {rclone_api-1.0.47 → rclone_api-1.0.48}/lint +0 -0
- {rclone_api-1.0.47 → rclone_api-1.0.48}/requirements.testing.txt +0 -0
- {rclone_api-1.0.47 → rclone_api-1.0.48}/setup.cfg +0 -0
- {rclone_api-1.0.47 → rclone_api-1.0.48}/setup.py +0 -0
- {rclone_api-1.0.47 → rclone_api-1.0.48}/src/rclone_api/__init__.py +0 -0
- {rclone_api-1.0.47 → rclone_api-1.0.48}/src/rclone_api/assets/example.txt +0 -0
- {rclone_api-1.0.47 → rclone_api-1.0.48}/src/rclone_api/cli.py +0 -0
- {rclone_api-1.0.47 → rclone_api-1.0.48}/src/rclone_api/cmd/list_files.py +0 -0
- {rclone_api-1.0.47 → rclone_api-1.0.48}/src/rclone_api/completed_process.py +0 -0
- {rclone_api-1.0.47 → rclone_api-1.0.48}/src/rclone_api/config.py +0 -0
- {rclone_api-1.0.47 → rclone_api-1.0.48}/src/rclone_api/convert.py +0 -0
- {rclone_api-1.0.47 → rclone_api-1.0.48}/src/rclone_api/deprecated.py +0 -0
- {rclone_api-1.0.47 → rclone_api-1.0.48}/src/rclone_api/diff.py +0 -0
- {rclone_api-1.0.47 → rclone_api-1.0.48}/src/rclone_api/dir.py +0 -0
- {rclone_api-1.0.47 → rclone_api-1.0.48}/src/rclone_api/dir_listing.py +0 -0
- {rclone_api-1.0.47 → rclone_api-1.0.48}/src/rclone_api/exec.py +0 -0
- {rclone_api-1.0.47 → rclone_api-1.0.48}/src/rclone_api/file.py +0 -0
- {rclone_api-1.0.47 → rclone_api-1.0.48}/src/rclone_api/filelist.py +0 -0
- {rclone_api-1.0.47 → rclone_api-1.0.48}/src/rclone_api/group_files.py +0 -0
- {rclone_api-1.0.47 → rclone_api-1.0.48}/src/rclone_api/process.py +0 -0
- {rclone_api-1.0.47 → rclone_api-1.0.48}/src/rclone_api/remote.py +0 -0
- {rclone_api-1.0.47 → rclone_api-1.0.48}/src/rclone_api/rpath.py +0 -0
- {rclone_api-1.0.47 → rclone_api-1.0.48}/src/rclone_api/util.py +0 -0
- {rclone_api-1.0.47 → rclone_api-1.0.48}/src/rclone_api/walk.py +0 -0
- {rclone_api-1.0.47 → rclone_api-1.0.48}/src/rclone_api.egg-info/SOURCES.txt +0 -0
- {rclone_api-1.0.47 → rclone_api-1.0.48}/src/rclone_api.egg-info/dependency_links.txt +0 -0
- {rclone_api-1.0.47 → rclone_api-1.0.48}/src/rclone_api.egg-info/entry_points.txt +0 -0
- {rclone_api-1.0.47 → rclone_api-1.0.48}/src/rclone_api.egg-info/requires.txt +0 -0
- {rclone_api-1.0.47 → rclone_api-1.0.48}/src/rclone_api.egg-info/top_level.txt +0 -0
- {rclone_api-1.0.47 → rclone_api-1.0.48}/test +0 -0
- {rclone_api-1.0.47 → rclone_api-1.0.48}/tests/test_cmd_list_files.py +0 -0
- {rclone_api-1.0.47 → rclone_api-1.0.48}/tests/test_copy.py +0 -0
- {rclone_api-1.0.47 → rclone_api-1.0.48}/tests/test_diff.py +0 -0
- {rclone_api-1.0.47 → rclone_api-1.0.48}/tests/test_group_files.py +0 -0
- {rclone_api-1.0.47 → rclone_api-1.0.48}/tests/test_is_synced.py +0 -0
- {rclone_api-1.0.47 → rclone_api-1.0.48}/tests/test_ls.py +0 -0
- {rclone_api-1.0.47 → rclone_api-1.0.48}/tests/test_mount.py +0 -0
- {rclone_api-1.0.47 → rclone_api-1.0.48}/tests/test_mount_s3.py +0 -0
- {rclone_api-1.0.47 → rclone_api-1.0.48}/tests/test_mount_webdav.py +0 -0
- {rclone_api-1.0.47 → rclone_api-1.0.48}/tests/test_obscure.py +0 -0
- {rclone_api-1.0.47 → rclone_api-1.0.48}/tests/test_remote_control.py +0 -0
- {rclone_api-1.0.47 → rclone_api-1.0.48}/tests/test_remotes.py +0 -0
- {rclone_api-1.0.47 → rclone_api-1.0.48}/tests/test_serve_webdav.py +0 -0
- {rclone_api-1.0.47 → rclone_api-1.0.48}/tests/test_walk.py +0 -0
- {rclone_api-1.0.47 → rclone_api-1.0.48}/tox.ini +0 -0
- {rclone_api-1.0.47 → rclone_api-1.0.48}/upload_package.sh +0 -0
@@ -261,7 +261,13 @@ class Rclone:
|
|
261
261
|
cmd_list: list[str] = ["copyto", src, dst]
|
262
262
|
self._run(cmd_list)
|
263
263
|
|
264
|
-
def copy_to(
|
264
|
+
def copy_to(
|
265
|
+
self,
|
266
|
+
src: File | str,
|
267
|
+
dst: File | str,
|
268
|
+
check=True,
|
269
|
+
other_args: list[str] | None = None,
|
270
|
+
) -> None:
|
265
271
|
"""Copy multiple files from source to destination.
|
266
272
|
|
267
273
|
Warning - slow.
|
@@ -272,9 +278,16 @@ class Rclone:
|
|
272
278
|
src = str(src)
|
273
279
|
dst = str(dst)
|
274
280
|
cmd_list: list[str] = ["copyto", src, dst]
|
275
|
-
|
281
|
+
if other_args is not None:
|
282
|
+
cmd_list += other_args
|
283
|
+
self._run(cmd_list, check=check)
|
276
284
|
|
277
|
-
def copyfiles(
|
285
|
+
def copyfiles(
|
286
|
+
self,
|
287
|
+
files: str | File | list[str] | list[File],
|
288
|
+
check=True,
|
289
|
+
other_args: list[str] | None = None,
|
290
|
+
) -> list[CompletedProcess]:
|
278
291
|
"""Copy multiple files from source to destination.
|
279
292
|
|
280
293
|
Warning - slow.
|
@@ -284,10 +297,11 @@ class Rclone:
|
|
284
297
|
"""
|
285
298
|
payload: list[str] = convert_to_filestr_list(files)
|
286
299
|
if len(payload) == 0:
|
287
|
-
return
|
300
|
+
return []
|
288
301
|
|
289
302
|
datalists: dict[str, list[str]] = group_files(payload)
|
290
|
-
out: subprocess.CompletedProcess | None = None
|
303
|
+
# out: subprocess.CompletedProcess | None = None
|
304
|
+
out: list[CompletedProcess] = []
|
291
305
|
|
292
306
|
futures: list[Future] = []
|
293
307
|
|
@@ -309,19 +323,23 @@ class Rclone:
|
|
309
323
|
"--transfers",
|
310
324
|
"1000",
|
311
325
|
]
|
326
|
+
if other_args is not None:
|
327
|
+
cmd_list += other_args
|
312
328
|
out = self._run(cmd_list)
|
313
329
|
return out
|
314
330
|
|
315
331
|
fut: Future = EXECUTOR.submit(_task)
|
316
332
|
futures.append(fut)
|
317
333
|
for fut in futures:
|
318
|
-
|
319
|
-
assert
|
320
|
-
|
334
|
+
cp: subprocess.CompletedProcess = fut.result()
|
335
|
+
assert cp is not None
|
336
|
+
out.append(CompletedProcess.from_subprocess(cp))
|
337
|
+
if cp.returncode != 0:
|
321
338
|
if check:
|
322
|
-
raise ValueError(f"Error deleting files: {
|
339
|
+
raise ValueError(f"Error deleting files: {cp.stderr}")
|
323
340
|
else:
|
324
|
-
warnings.warn(f"Error deleting files: {
|
341
|
+
warnings.warn(f"Error deleting files: {cp.stderr}")
|
342
|
+
return out
|
325
343
|
|
326
344
|
def copy(self, src: Dir | str, dst: Dir | str) -> CompletedProcess:
|
327
345
|
"""Copy files from source to destination.
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|