Add libarchive support

I know is possible to tar and upload with:

  • tar -zcvf - source | rclone rcat remote:destination.tar

we can extract a file with:

  • rclone cat remote:source.tar | tar zxf -

Unfortunately we can't just tar a remote directory or extract to a remote directory. I was looking at libarchive and the minitar example and I imagine adding libarchive support would not be that complicated. Having something like:

  • rclone tar --tar-format tar.gz remote:source/ remote:destination.tar.gz
  • rclone untar remote:source.tar remote:destination/

Ok, nobody mentioned anything, so I started working on it on my own. I have it working but for now only archives to stdout and testing on local directories. Don't know why wouldn't work on remote ones, uses the Walk() function to get the files.

rclone -q tar --format tar.gz /mydir/ > test.tar.gz

My question is how can I get gid/uid and time for the fs.Object? Where do I look?