Add -r for rm and -p for mkdir

This commit is contained in:
2022-09-03 16:28:25 -07:00
parent 6f87980d4b
commit 4efa4380c4
4 changed files with 68 additions and 2 deletions

View File

@@ -2,6 +2,16 @@ package api
import "context"
func (c *Client) RemoveAll(ctx context.Context, paths ...string) error {
return c.client.Call(
ctx,
"FS",
"RemoveAll",
paths,
nil,
)
}
func (c *Client) Remove(ctx context.Context, paths ...string) error {
return c.client.Call(
ctx,
@@ -22,6 +32,16 @@ func (c *Client) Rename(ctx context.Context, old, new string) error {
)
}
func (c *Client) MkdirAll(ctx context.Context, paths ...string) error {
return c.client.Call(
ctx,
"FS",
"MkdirAll",
paths,
nil,
)
}
func (c *Client) Mkdir(ctx context.Context, paths ...string) error {
return c.client.Call(
ctx,