rclone-api 1.0.5__py2.py3-none-any.whl → 1.0.6__py2.py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- rclone_api/dir.py +3 -13
- {rclone_api-1.0.5.dist-info → rclone_api-1.0.6.dist-info}/METADATA +1 -1
- {rclone_api-1.0.5.dist-info → rclone_api-1.0.6.dist-info}/RECORD +6 -6
- {rclone_api-1.0.5.dist-info → rclone_api-1.0.6.dist-info}/LICENSE +0 -0
- {rclone_api-1.0.5.dist-info → rclone_api-1.0.6.dist-info}/WHEEL +0 -0
- {rclone_api-1.0.5.dist-info → rclone_api-1.0.6.dist-info}/top_level.txt +0 -0
rclone_api/dir.py
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
from rclone_api.
|
1
|
+
from rclone_api.dir_listing import DirListing
|
2
2
|
from rclone_api.rpath import RPath
|
3
3
|
|
4
4
|
|
@@ -8,20 +8,10 @@ class Dir:
|
|
8
8
|
def __init__(self, path: RPath) -> None:
|
9
9
|
self.path = path
|
10
10
|
|
11
|
-
def ls(self) ->
|
11
|
+
def ls(self) -> DirListing:
|
12
12
|
"""List files and directories in the given path."""
|
13
|
-
cmd = ["lsjson", "--files-only", "--dirs-only", "--json", str(self.path)]
|
14
13
|
assert self.path.rclone is not None
|
15
|
-
|
16
|
-
text = cp.stdout
|
17
|
-
tmp: list[RPath] = RPath.from_json_str(text)
|
18
|
-
for t in tmp:
|
19
|
-
t.set_rclone(self.path.rclone)
|
20
|
-
# dirs = [o for o in out if o.is_dir]
|
21
|
-
# files = [o for o in out if not o.is_dir]
|
22
|
-
dirs = [Dir(p) for p in tmp if p.is_dir]
|
23
|
-
files = [File(p) for p in tmp if not p.is_dir]
|
24
|
-
return dirs, files
|
14
|
+
return self.path.rclone.ls(self.path.path)
|
25
15
|
|
26
16
|
def __str__(self) -> str:
|
27
17
|
return str(self.path)
|
@@ -1,7 +1,7 @@
|
|
1
1
|
rclone_api/__init__.py,sha256=YH7KQaPwUiJWJiRf0NRKD7XHhMXsxWdXDjt9WLSwdjA,265
|
2
2
|
rclone_api/cli.py,sha256=dibfAZIh0kXWsBbfp3onKLjyZXo54mTzDjUdzJlDlWo,231
|
3
3
|
rclone_api/config.py,sha256=UujjDNcpwgipgdyFPMhC3zikvlsrurUvvZiwXm5NlPg,471
|
4
|
-
rclone_api/dir.py,sha256=
|
4
|
+
rclone_api/dir.py,sha256=gzQ9tvnvtddVWN8GmumoAasP3LtMFh20CVyaMH-HxJk,447
|
5
5
|
rclone_api/dir_listing.py,sha256=N2tEcAx721r1HlV0Cax-sutkLJMW4AAofZMVA-Z_aQQ,206
|
6
6
|
rclone_api/file.py,sha256=409neYPfCUKQX2w7Uw7_D0wR2PtH42srNe9u_nnOLxM,925
|
7
7
|
rclone_api/rclone.py,sha256=J7pFhe4mHaN415yFP2k_9jr9UnrEiq3lDaKhefepVfA,2053
|
@@ -10,8 +10,8 @@ rclone_api/rpath.py,sha256=_k59z-O75hAhpPyUSH4glPEoiYtIS3RUQb7ltU9Ianw,2009
|
|
10
10
|
rclone_api/types.py,sha256=Yp15HrjwZonSQhE323R0WP7fA4NWqKjAfM7z3OwHpWI,518
|
11
11
|
rclone_api/util.py,sha256=EXnijLLdFHqwoZvHrZdqeM8r6T7ad9-pN7qBN1b0I_g,1465
|
12
12
|
rclone_api/assets/example.txt,sha256=lTBovRjiz0_TgtAtbA1C5hNi2ffbqnNPqkKg6UiKCT8,54
|
13
|
-
rclone_api-1.0.
|
14
|
-
rclone_api-1.0.
|
15
|
-
rclone_api-1.0.
|
16
|
-
rclone_api-1.0.
|
17
|
-
rclone_api-1.0.
|
13
|
+
rclone_api-1.0.6.dist-info/LICENSE,sha256=b6pOoifSXiUaz_lDS84vWlG3fr4yUKwB8fzkrH9R8bQ,1064
|
14
|
+
rclone_api-1.0.6.dist-info/METADATA,sha256=hQ9HbGL2oL7TKOOfI4H10DzXZS_vgb-6zKZzJBQbJLA,1244
|
15
|
+
rclone_api-1.0.6.dist-info/WHEEL,sha256=9Hm2OB-j1QcCUq9Jguht7ayGIIZBRTdOXD1qg9cCgPM,109
|
16
|
+
rclone_api-1.0.6.dist-info/top_level.txt,sha256=EvZ7uuruUpe9RiUyEp25d1Keq7PWYNT0O_-mr8FCG5g,11
|
17
|
+
rclone_api-1.0.6.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|