MCPcopy Create free account
hub / github.com/cloudreve/cloudreve / Cleanup

Function Cleanup

service/node/task.go:130–142  ·  view source on GitHub ↗
(args *cluster.FolderCleanup, c *gin.Context)

Source from the content-addressed store, hash-verified

128)
129
130func Cleanup(args *cluster.FolderCleanup, c *gin.Context) error {
131 l := logging.FromContext(c)
132 ae := serializer.NewAggregateError()
133 for _, p := range args.Path {
134 l.Info("Cleaning up folder %q", p)
135 if err := os.RemoveAll(p); err != nil {
136 l.Warning("Failed to clean up folder %q: %s", p, err)
137 ae.Add(p, err)
138 }
139 }
140
141 return ae.Aggregate()
142}
143
144type (
145 CreateSlaveDownloadTaskParamCtx struct{}

Callers 1

SlaveCleanupFolderFunction · 0.92

Calls 6

AddMethod · 0.95
AggregateMethod · 0.95
FromContextFunction · 0.92
NewAggregateErrorFunction · 0.92
InfoMethod · 0.65
WarningMethod · 0.65

Tested by

no test coverage detected