forked from Elara6331/itd
Implementing remove
This commit is contained in:
parent
82ed906857
commit
9d28a2a1f8
15
fuse/main.go
15
fuse/main.go
@ -390,6 +390,21 @@ func (f *ITNode) Rename(ctx context.Context, name string, newParent fs.InodeEmbe
|
|||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var _ = (fs.NodeUnlinker)((*ITNode)(nil))
|
||||||
|
func (f *ITNode) Unlink(ctx context.Context, name string) syscall.Errno {
|
||||||
|
delete(inodemap, f.path + "/" + name)
|
||||||
|
err := myfs.Remove(f.path + "/" + name)
|
||||||
|
if err != nil {
|
||||||
|
return syscall.EROFS
|
||||||
|
}
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
var _ = (fs.NodeRmdirer)((*ITNode)(nil))
|
||||||
|
func (f *ITNode) Rmdir(ctx context.Context, name string) syscall.Errno {
|
||||||
|
return f.Unlink(ctx, name)
|
||||||
|
}
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
// This is where we'll mount the FS
|
// This is where we'll mount the FS
|
||||||
mntDir := "/tmp/x"
|
mntDir := "/tmp/x"
|
||||||
|
Loading…
Reference in New Issue
Block a user