Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This change is fairly simple
ampy rm
: be able to specify any number of files (note zero files is not an error, per recommendation by Python Click)ampy get
: be able to specify a directory as the destination instead of a fileampy get
: be able to specify multiple files from the remote, which will only work if the destination is a currently existing directory.ampy get
: for one remote file, you can give-
to explicitly specify writing to standard output.Related Work
I see this is somewhat similar to pull request #88. If desired for
ampy get
, we could allow remote directories to be specified as well. However, I think a destination directory would need to be specified as it becomes weird to print the contents of an entire directory to standard out.My recommendation:
Questions
One tricky folder is the root folder, which has no name.
/
is specified as the only remote path, then what do we do if the destination is a currently existing directory? Here are a few options (I'm partial to solution (a)):a. Have it be an error - you must specify a directory that does not exist
b. Copy all files and folders into that destination
c. Create a hard-coded named directory in the destination called something like
pyboard_root
to copy stuff into.--recursive
/-r
flag to indicate that we do indeed want to copy a whole directory (if specified)? Either way is fine with me.Conclusion
This could allow for something like
to copy all files and folders and store them in a folder called
board_copy