Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: support automatically create folder structure when uploading folder #102

Merged
merged 1 commit into from
Nov 21, 2023

Conversation

flywukong
Copy link
Collaborator

@flywukong flywukong commented Nov 20, 2023

Description

support automatically create folders structure when uploading a local folder in a recursive way. The command will create empty files for the folders

Rationale

it is reasonable to automatically create directory structure when upload the folder even the folder is a empty file

Example

wayen@c02fvfsdmd6m testnet-test % tree test-dir9
test-dir9
├── hunter.jpeg9
├── test-dir88
└── test-dir89
    ├── download.log6
    └── download.log9

2 directories, 3 files
wayen@c02fvfsdmd6m testnet-test % ./gnfd-cmd object put --recursive test-dir9 gnfd://diiik1

Please enter the passphrase now:
creating folder: test-dir9
creating folder: test-dir9/test-dir88
creating folder: test-dir9/test-dir89
uploading progress: 100.00% [ 15.70K / 15.70K ], rate: 13.49 KB/s
sealing...
upload test-dir9/hunter.jpeg9 to gnfd://diiik1
uploading progress: 100.00% [ 39.38K / 39.38K ], rate: 34.17 KB/s
sealing...
upload test-dir9/test-dir89/download.log6 to gnfd://diiik1
uploading progress: 100.00% [ 174.97K / 174.97K ], rate: 152.71 KB/s
sealing...
upload test-dir9/test-dir89/download.log9 to gnfd://diiik1

wayen@c02fvfsdmd6m testnet-test % ./gnfd-cmd object ls --recursive  gnfd://diiik1/test-dir9
Please enter the passphrase now:
2023-11-20 18:12:45               0 test-dir9/
2023-11-20 17:17:32         1110920 test-dir9/download.log90
2023-11-20 18:13:01           16077 test-dir9/hunter.jpeg9
2023-11-20 18:12:51               0 test-dir9/test-dir88/
2023-11-20 18:12:56               0 test-dir9/test-dir89/
2023-11-20 18:13:11           40330 test-dir9/test-dir89/download.log6
2023-11-20 18:13:22          179167 test-dir9/test-dir89/download.log9

Changes

Notable changes:

  • add each change in a bullet point here
  • ...

@flywukong flywukong merged commit 1b40884 into bnb-chain:master Nov 21, 2023
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants