Browse Source

batch delete file ids

pull/778/head
Chris Lu 6 years ago
parent
commit
b318167cd3
  1. 4
      weed/filer2/filer.go

4
weed/filer2/filer.go

@ -231,9 +231,11 @@ func (f *Filer) cacheSetDirectory(dirpath string, dirEntry *Entry, level int) {
}
func (f *Filer) DeleteChunks(chunks []*filer_pb.FileChunk) {
var fileIds []string
for _, chunk := range chunks {
f.DeleteFileByFileId(chunk.FileId)
fileIds = append(fileIds, chunk.FileId)
}
operation.DeleteFiles(f.GetMaster(), fileIds)
}
func (f *Filer) DeleteFileByFileId(fileId string) {

Loading…
Cancel
Save