Refactor ./mc cp with various modes of operation

- First mode of operation supports with style `Path` `S3Path` or `Path` `S3Bucket`
- Second mode of operation supports with style `S3Path` `Path` or `S3Path` `.`
- Third mode of operation supports with style `S3Path` `S3Path` or `S3Path` `S3Bucket`
This commit is contained in:
Harshavardhana
2015-03-12 19:12:19 -07:00
parent eb787b5a79
commit 8fd4e4a0bb
5 changed files with 260 additions and 134 deletions
+1 -1
View File
@@ -92,7 +92,7 @@ func (c *Client) Put(bucket, key string, size int64, contents io.Reader) error {
}
// Stat - returns 0, "", os.ErrNotExist if not on S3
func (c *Client) Stat(key, bucket string) (size int64, date time.Time, reterr error) {
func (c *Client) Stat(bucket, key string) (size int64, date time.Time, reterr error) {
req := newReq(c.keyURL(bucket, key))
req.Method = "HEAD"
c.Auth.signRequest(req)