fix Mkdir signature
This commit is contained in:
parent
3e22786a18
commit
9e2acd491b
11
client.go
11
client.go
@ -133,20 +133,17 @@ func (c *Client) Remove(path string) error {
|
||||
}
|
||||
}
|
||||
|
||||
func (c *Client) Mkdir(path string) error {
|
||||
func (c *Client) Mkdir(path string, _ os.FileMode) error {
|
||||
path = FixSlashes(path)
|
||||
status := c.mkcol(path)
|
||||
if status == 201 {
|
||||
return nil
|
||||
} else {
|
||||
return newPathError("Mkdir", path, status)
|
||||
}
|
||||
|
||||
if status == 409 {
|
||||
// TODO
|
||||
}
|
||||
|
||||
return errors.New(fmt.Sprintf("%d", status))
|
||||
}
|
||||
|
||||
|
||||
func (c *Client) Read(path string) {
|
||||
fmt.Println("Read " + path)
|
||||
}
|
||||
|
@ -61,7 +61,7 @@ func main() {
|
||||
}
|
||||
|
||||
case "MKCOL", "MKDIR":
|
||||
if err := c.Mkdir(path); err != nil {
|
||||
if err := c.Mkdir(path, 0); err != nil {
|
||||
fmt.Println(err)
|
||||
} else {
|
||||
fmt.Println("MkDir: " + path)
|
||||
|
Loading…
Reference in New Issue
Block a user