mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2024-12-02 16:39:16 +08:00
23 lines
436 B
Go
23 lines
436 B
Go
package filesys
|
|
|
|
import (
|
|
"context"
|
|
"github.com/chrislusf/seaweedfs/weed/pb/filer_pb"
|
|
)
|
|
|
|
func (wfs *WFS) deleteFileChunks(chunks []*filer_pb.FileChunk) {
|
|
if len(chunks) == 0 {
|
|
return
|
|
}
|
|
|
|
var fileIds []string
|
|
for _, chunk := range chunks {
|
|
fileIds = append(fileIds, chunk.FileId)
|
|
}
|
|
|
|
wfs.withFilerClient(func(client filer_pb.SeaweedFilerClient) error {
|
|
deleteFileIds(context.Background(), client, fileIds)
|
|
return nil
|
|
})
|
|
}
|