Added FUSE support #55

Merged
Elara6331 merged 65 commits from yannickulrich/itd:fuse into master 2023-03-25 22:23:52 +00:00
Showing only changes of commit 9d28a2a1f8 - Show all commits

View File

@ -390,6 +390,21 @@ func (f *ITNode) Rename(ctx context.Context, name string, newParent fs.InodeEmbe
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() {
// This is where we'll mount the FS
mntDir := "/tmp/x"