You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

20 lines
544 B

3 years ago
3 years ago
  1. package mount
  2. import "github.com/hanwen/go-fuse/v2/fuse"
  3. func (wfs *WFS) AcquireHandle(inode uint64, uid, gid uint32) (fileHandle *FileHandle, code fuse.Status) {
  4. _, _, entry, status := wfs.maybeReadEntry(inode)
  5. if status == fuse.OK {
  6. fileHandle = wfs.fhmap.AcquireFileHandle(wfs, inode, entry)
  7. fileHandle.entry = entry
  8. }
  9. return
  10. }
  11. func (wfs *WFS) ReleaseHandle(handleId FileHandleId) {
  12. wfs.fhmap.ReleaseByHandle(handleId)
  13. }
  14. func (wfs *WFS) GetHandle(handleId FileHandleId) *FileHandle {
  15. return wfs.fhmap.GetFileHandle(handleId)
  16. }