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

feat: support file multiple match and other optimizations #96

Merged
merged 4 commits into from
May 20, 2024

Conversation

fireyun
Copy link
Contributor

@fireyun fireyun commented May 18, 2024

feat: support file multiple match and other optimizations --story=116719162
文件下载命令优化:

  1. -d 参数直接指定目录即可,下载的路径、文件名与BSCP上保持一致,例如:下载文件/etc/confing/network.cfg文件,-d /data/save,那下载完后保存文件的路径为:/data/save/etc/confing/network.cfg,有重名文件时直接覆盖

  2. 新增一个参数:--ignore-dir,参数描述为:ignore directory hierarchy when downloading files, must be used with -d option
    这个参数的作用是下载文件时忽略目录层级,例如:下载文件/etc/confing/network.cfg文件,-d /data/save,那下载完后保存文件的路径为:/data/save/network.cfg
    如果下载的多个文件有文件重名时,那么报错提示有重名文件,无法使用--ignore-dir参数

  3. 判断目录是否存在要提前,不要等下载完后再报个错没有路径,如果-d指定的路径不存在时直接报错,无需自动创建
    root@FRODOMEI-PC:~/bscp# ./bscp -c ./bscp.yaml get file -a alkaid-test-file //big-file-3 -d /mnt/d/c/big-file-3
    Error: open /mnt/d/c/big-file-3: no such file or directory

  4. get file命令不只是需要支持通配,还需要支持多文件,多文件以空格分隔,与get kv的逻辑保持一致

@ifooth ifooth merged commit b254852 into TencentBlueKing:master May 20, 2024
4 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.

2 participants