I'm trying to write a simple plugin that will download a file and extract it into a specific directory under the current project root. So for example, I'd have a command that takes two parameters:
- Code: Select all
download http://example.com/myarchive.gz assets/components
And that would download http://example.com/myarchive.gz, extract it into [project root]/assets/components/myarchive, and then delete the old file.
I'm at a complete loss as to how to do this, and I'm struggling to find any similar examples to learn from. Any pointers in the right direction would be fantastic. Thanks in advance for any help.