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

lsjson: add --metadata/-M flag

Note that this removes the `-M` flag from `--encrypted` as it
conflicted with the global flag and adds it to `--metadata`.
This commit is contained in:
Nick Craig-Wood
2022-05-24 11:16:29 +01:00
parent 78d52882ca
commit d823a38ce5
4 changed files with 29 additions and 1 deletions

View File

@@ -172,6 +172,19 @@ func TestListJSON(t *testing.T) {
ModTime: operations.Timestamp{When: t1},
IsDir: false,
}},
}, {
name: "Metadata",
opt: operations.ListJSONOpt{
FilesOnly: true,
Metadata: true,
},
want: []*operations.ListJSONItem{{
Path: "file1",
Name: "file1",
Size: 5,
ModTime: operations.Timestamp{When: t1},
IsDir: false,
}},
},
} {
t.Run(test.name, func(t *testing.T) {