|
@ -17,7 +17,7 @@ const ( |
|
|
type OnChunksFunc func([]*filer_pb.FileChunk) error |
|
|
type OnChunksFunc func([]*filer_pb.FileChunk) error |
|
|
type OnHardLinkIdsFunc func([]HardLinkId) error |
|
|
type OnHardLinkIdsFunc func([]HardLinkId) error |
|
|
|
|
|
|
|
|
func (f *Filer) DeleteEntryMetaAndData(ctx context.Context, p util.FullPath, isRecursive, ignoreRecursiveError, shouldDeleteChunks, isFromOtherCluster bool, signatures []int32) (err error) { |
|
|
|
|
|
|
|
|
func (f *Filer) DeleteEntryMetaAndData(ctx context.Context, p util.FullPath, isRecursive, ignoreRecursiveError, shouldDeleteChunks, isFromOtherCluster bool, signatures []int32, ifNotModifiedAfter int64) (err error) { |
|
|
if p == "/" { |
|
|
if p == "/" { |
|
|
return nil |
|
|
return nil |
|
|
} |
|
|
} |
|
@ -26,6 +26,9 @@ func (f *Filer) DeleteEntryMetaAndData(ctx context.Context, p util.FullPath, isR |
|
|
if findErr != nil { |
|
|
if findErr != nil { |
|
|
return findErr |
|
|
return findErr |
|
|
} |
|
|
} |
|
|
|
|
|
if ifNotModifiedAfter > 0 && entry.Attr.Mtime.Unix() > ifNotModifiedAfter { |
|
|
|
|
|
return nil |
|
|
|
|
|
} |
|
|
isDeleteCollection := f.isBucket(entry) |
|
|
isDeleteCollection := f.isBucket(entry) |
|
|
if entry.IsDirectory() { |
|
|
if entry.IsDirectory() { |
|
|
// delete the folder children, not including the folder itself
|
|
|
// delete the folder children, not including the folder itself
|
|
|