implement READ & WRITE

This commit is contained in:
Christoph Polcin
2014-10-27 14:32:16 +01:00
parent d8aaad0e18
commit e4fac5eebf
3 changed files with 103 additions and 5 deletions

View File

@@ -118,3 +118,12 @@ func (c *Client) copymove(method string, oldpath string, newpath string, overwri
return newPathError(method, oldpath, rs.StatusCode)
}
func (c *Client) put(path string, stream io.Reader) int {
rs, err := c.reqDo("PUT", path, stream)
if err != nil {
return 400
}
defer rs.Body.Close()
return rs.StatusCode
}