From 5482a71dc0c1786e5f44718e822712dffbb4eacf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AD=99=E6=B0=B8=E5=BC=BA?= <11704063+s-yongqiang@user.noreply.gitee.com> Date: Fri, 21 Feb 2025 10:27:12 +0800 Subject: [PATCH 1/2] Update README.md --- README.md | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/README.md b/README.md index 96d9ea7..e812155 100644 --- a/README.md +++ b/README.md @@ -405,6 +405,35 @@ A repo info in plain object is returned: 'last_modified': '2024-04-12T12:35:42+08:00' } ``` +### Upload a file + +```python +repo.upload_file(dir_path, file_path) +``` + +Upload local files to the repo. + +**Example:** + +```python +repo.upload_file('/', '/files/test.txt') +``` + + +### Download file + +```python +repo.download_file(file_path) +``` + +A file in a specific path will be download. + +**Example:** + +```python +repo.download_file('/test.txt') +``` + From 6091505c564750b14387bb4ed8105af6518e8680 Mon Sep 17 00:00:00 2001 From: Ranjiwei <32759763+r350178982@users.noreply.github.com> Date: Fri, 21 Feb 2025 13:38:07 +0800 Subject: [PATCH 2/2] Update README.md --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index e812155..1af584b 100644 --- a/README.md +++ b/README.md @@ -411,7 +411,7 @@ A repo info in plain object is returned: repo.upload_file(dir_path, file_path) ``` -Upload local files to the repo. +Upload local files with file_path to the dir_path of a repo. **Example:** @@ -423,15 +423,15 @@ repo.upload_file('/', '/files/test.txt') ### Download file ```python -repo.download_file(file_path) +repo.download_file(file_path, local_path) ``` -A file in a specific path will be download. +A file in a specific path will be downloaded into local_path. **Example:** ```python -repo.download_file('/test.txt') +repo.download_file('/test.txt', '/Users/test.txt') ```