Skip to content

Commit d2c60aa

Browse files
committed
Rename list_file to list_remote_files, get_file_list to list_local_files
1 parent a4a314c commit d2c60aa

2 files changed

Lines changed: 8 additions & 6 deletions

File tree

src/bin/qfieldcloud-cli

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ def list_files(ctx, project_id):
172172

173173
log(f'Getting file list for "{project_id}"…')
174174

175-
files = ctx.obj["client"].list_files(project_id)
175+
files = ctx.obj["client"].list_remote_files(project_id)
176176

177177
if ctx.obj["format_json"]:
178178
print_json(files)

src/qfieldcloud_sdk/sdk.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ def list_projects(
129129

130130
return resp.json()
131131

132-
def list_files(self, project_id: str) -> List[Dict[str, Any]]:
132+
def list_remote_files(self, project_id: str) -> List[Dict[str, Any]]:
133133
resp = self._request("GET", f"files/{project_id}")
134134
return resp.json()
135135

@@ -172,7 +172,7 @@ def upload_files(
172172
if not filter_glob:
173173
filter_glob = "*"
174174

175-
files = self.get_files_list(project_path, filter_glob)
175+
files = self.list_local_files(project_path, filter_glob)
176176

177177
if not files:
178178
return files
@@ -261,7 +261,7 @@ def download_project(
261261
filter_glob: if specified, download only the files which match the glob, otherwise download all
262262
"""
263263

264-
files = self.list_files(project_id)
264+
files = self.list_remote_files(project_id)
265265

266266
return self.download_files(
267267
files,
@@ -332,7 +332,7 @@ def delete_files(
332332
Returns:
333333
Dict[str, Dict[str, Any]]: Deleted files by glob pattern.
334334
"""
335-
project_files = self.list_files(project_id)
335+
project_files = self.list_remote_files(project_id)
336336
glob_results = {}
337337
self._log(f"Project '{project_id}' has {len(project_files)} file(s).")
338338

@@ -566,7 +566,9 @@ def download_file(
566566

567567
return resp
568568

569-
def get_files_list(self, root_path: str, filter_glob: str) -> List[Dict[str, Any]]:
569+
def list_local_files(
570+
self, root_path: str, filter_glob: str
571+
) -> List[Dict[str, Any]]:
570572
"""
571573
Returns a list of dicts with information about local files. Usually used before uploading files.
572574
NOTE: files and dirs starting with leading zero in the root directory will be ignored.

0 commit comments

Comments
 (0)