Add checksums to pipe, cp, mirror commands.
> Add checksum to uploaded object. Values: MD5, CRC32, CRC32C, SHA1 or SHA256. Requires server trailing headers support like AWS, MinIO and possibly others.
`--md5` is hidden, but still applied.
Uploads to buckets with object locking will still use MD5.
Bonus: `mc stat` shows checksum information.
allow users to avoid list() call when an object does not
exist when following flags are used with `mc stat`
```
--no-list (HEAD the latest version)
--version-id <vid>
```
Also avoid superflous url2Stat() calls while processing
the args, there is no real reason to do that.
Many listings would stop after the first version had been processed on Windows, since
For example, `mytls/testbucket/trace.json` != `mytls\testbucket\trace.json` would cause `mc undo` to only see one version since this would fail.
Use `getStandardizedURL` for both sides of these compares.
- fixes errant top level directory creation, regression introduced in #3313
- fixes `mc ls -r` regression introduced in #3476
- fixes other bugs such as `mc mirror` would perpetually hang if the
destination bucket doesn't exist, create and proceed instead.
- removes DirOpt style implementations for List, ListIncompleteUploads
these are not useful anymore.
If --versions flag is specified, instead of HEAD currently
repeated listing is being done and latest version ID reported
for all the versions instead of actual version ID.
Add a new field in the stat output to show if the object has any
expiration date due to lifecycle expiration rules. The expiration date
is show in machine local time.
--rewind will go back in time and select specific object versions that are
the latest at the specified time.
--versions will display all the versions
cp will just ignore if the latest version is a delete marker
ls will print delete markers with a (deleted) at the end
Stat() is supposed to return valid information for existing
objects and existing prefixes as well.
The current mechanism issues a listing request and searches
for the object or prefix in the returned list, but this could take
time if there are a lot of entries under a parent prefix.
The new commit changes the internal behavior but not the
functional output. It issues a HEAD request first, if there
is no object then assumes it is a prefix and does listing
in order to find it.
List within the statURL function considers object name as a prefix
and lists objects that have the same prefix.
currently, it errors out if the object is a subset of another object.
This PR will fix this.
Fixes#2746