aboutsummaryrefslogtreecommitdiff
path: root/weed/mount/filehandle.go
diff options
context:
space:
mode:
Diffstat (limited to 'weed/mount/filehandle.go')
-rw-r--r--weed/mount/filehandle.go16
1 files changed, 16 insertions, 0 deletions
diff --git a/weed/mount/filehandle.go b/weed/mount/filehandle.go
new file mode 100644
index 000000000..551394262
--- /dev/null
+++ b/weed/mount/filehandle.go
@@ -0,0 +1,16 @@
+package mount
+
+import "github.com/hanwen/go-fuse/v2/fuse"
+
+func (wfs *WFS) AcquireHandle(inode uint64, uid, gid uint32) (fileHandle *FileHandle, code fuse.Status) {
+ _, entry, status := wfs.maybeReadEntry(inode)
+ if status == fuse.OK {
+ fileHandle = wfs.fhmap.GetFileHandle(inode)
+ fileHandle.entry = entry
+ }
+ return
+}
+
+func (wfs *WFS) ReleaseHandle(handleId FileHandleId) {
+ wfs.fhmap.ReleaseByHandle(handleId)
+}