1
0
mirror of https://github.com/rclone/rclone.git synced 2025-12-06 00:03:32 +00:00

Delete command which does obey the filters - fixes #327

This commit is contained in:
Nick Craig-Wood
2015-12-02 22:25:32 +00:00
parent 5c37b777fc
commit 1373efaa39
5 changed files with 74 additions and 3 deletions

View File

@@ -206,7 +206,8 @@ var Commands = []Command{
Name: "purge",
ArgsHelp: "remote:path",
Help: `
Remove the path and all of its contents.`,
Remove the path and all of its contents. Does not obey
filters - use remove for that.`,
Run: func(fdst, fsrc fs.Fs) error {
return fs.Purge(fdst)
},
@@ -214,6 +215,18 @@ var Commands = []Command{
MaxArgs: 1,
Retry: true,
},
{
Name: "delete",
ArgsHelp: "remote:path",
Help: `
Remove the contents of path. Obeys include/exclude filters.`,
Run: func(fdst, fsrc fs.Fs) error {
return fs.Delete(fdst)
},
MinArgs: 1,
MaxArgs: 1,
Retry: true,
},
{
Name: "check",
ArgsHelp: "source:path dest:path",