webdav: add Client.RemoveAll

This commit is contained in:
Simon Ser 2020-01-21 21:48:07 +01:00
parent 41b68829e8
commit 04bcea1ee8
No known key found for this signature in database
GPG Key ID: 0FDE7BE0E88F5E48

View File

@ -192,3 +192,13 @@ func (c *Client) Create(name string) (io.WriteCloser, error) {
return &fileWriter{pw, done}, nil return &fileWriter{pw, done}, nil
} }
func (c *Client) RemoveAll(name string) error {
req, err := c.ic.NewRequest(http.MethodDelete, name, nil)
if err != nil {
return err
}
_, err = c.ic.Do(req)
return err
}