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

All files actions (remove and get) #88

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

Sashkoiv
Copy link

@Sashkoiv Sashkoiv commented Jan 3, 2020

Sometimes I need to remove all files from the board, get all files or put all files to the board. Due to that,
I'm using those locally and pretty happy, so I'm suggesting small modifications to the original code.

Also for using vscode debugging I'm running the tool as a module and have added an extra record to .gitignore.

I'll appreciate any comments=)

Pass `--all` flag to retrieve files to the current directory
or specify the destination directory after the flag.
 - ampy --port /board/serial/port get --all
 - ampy --port /board/serial/port get --all ./destination/
To delete all files from the board:
  ampy --port /board/serial/port rm --all
@devxpy
Copy link
Member

devxpy commented Jan 22, 2020

To get all files, I would want to avoid adding a new option. Why not just do that if '/' is passed as the REMOTE_FILE argument?

$ ampy get /

Similarly, for the remove all command, this looks much more cleaner -

$ ampy rmdir /

@Sashkoiv
Copy link
Author

Hey @devxpy , good idea but not that obvious in my opinion.
Usually, people use commands like git add --all which is more informative for me.

@TonyLHansen
Copy link
Contributor

A better name for the option might be --recursive, which corresponds to the -R/-r/--recursive option found in the Unix/Linux commands rm and cp.

@TonyLHansen
Copy link
Contributor

I definitely prefer having an option rather than making "/" magic.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants