MCPcopy Create free account
hub / github.com/1Panel-dev/1Panel / RmRf

Method RmRf

agent/utils/files/file_op.go:190–195  ·  view source on GitHub ↗
(dst string)

Source from the content-addressed store, hash-verified

188}
189
190func (f FileOp) RmRf(dst string) error {
191 if IsProtected(dst) {
192 return buserr.New("ErrPathNotDelete")
193 }
194 return f.Fs.RemoveAll(dst)
195}
196
197func (f FileOp) WriteFile(dst string, in io.Reader, mode fs.FileMode) error {
198 file, err := f.Fs.OpenFile(dst, os.O_RDWR|os.O_CREATE|os.O_TRUNC, mode)

Callers 2

changeLocalBackupFunction · 0.95
ReduceMethod · 0.95

Calls 2

IsProtectedFunction · 0.85
RemoveAllMethod · 0.80

Tested by

no test coverage detected