filer: option to create file only if it is new, O_EXCL

This commit is contained in:
Chris Lu
2020-01-22 11:42:40 -08:00
parent 9b01a99d9a
commit d4e75a0d18
11 changed files with 140 additions and 122 deletions

View File

@@ -30,7 +30,7 @@ func TestCreateAndFind(t *testing.T) {
},
}
if err := filer.CreateEntry(ctx, entry1); err != nil {
if err := filer.CreateEntry(ctx, entry1, false); err != nil {
t.Errorf("create entry %v: %v", entry1.FullPath, err)
return
}