MCPcopy Index your code
hub / github.com/CovenantSQL/CovenantSQL / Remove

Method Remove

cmd/cql-fuse/node.go:273–284  ·  view source on GitHub ↗

Remove may be unlink or rmdir.

(ctx context.Context, req *fuse.RemoveRequest)

Source from the content-addressed store, hash-verified

271
272// Remove may be unlink or rmdir.
273func (n *Node) Remove(ctx context.Context, req *fuse.RemoveRequest) error {
274 if !n.isDir() {
275 return fuse.Errno(syscall.ENOTDIR)
276 }
277
278 if req.Dir {
279 // Rmdir.
280 return n.cfs.remove(ctx, n.ID, req.Name, true /* checkChildren */)
281 }
282 // Unlink file/symlink.
283 return n.cfs.remove(ctx, n.ID, req.Name, false /* !checkChildren */)
284}
285
286// Write writes data to 'n'. It may overwrite existing data, or grow it.
287func (n *Node) Write(ctx context.Context, req *fuse.WriteRequest, resp *fuse.WriteResponse) error {

Callers 12

removeFileIfIsNotSQLiteFunction · 0.45
TestLoadPrivateKeyFunction · 0.45
TestInitLocalKeyPairFunction · 0.45
start3BPsFunction · 0.45
askDeleteFileFunction · 0.45
BenchmarkDBWriteFunction · 0.45
BenchmarkSignSignatureFunction · 0.45
TestFullProcessFunction · 0.45
benchMinerFunction · 0.45
BenchmarkSQLiteFunction · 0.45

Calls 2

isDirMethod · 0.95
removeMethod · 0.45

Tested by 10

TestLoadPrivateKeyFunction · 0.36
TestInitLocalKeyPairFunction · 0.36
start3BPsFunction · 0.36
BenchmarkDBWriteFunction · 0.36
BenchmarkSignSignatureFunction · 0.36
TestFullProcessFunction · 0.36
benchMinerFunction · 0.36
BenchmarkSQLiteFunction · 0.36