aboutsummaryrefslogtreecommitdiff
path: root/internal/fusefrontend_reverse/virtualfile.go
diff options
context:
space:
mode:
authorJakob Unterwurzacher2016-09-28 23:30:13 +0200
committerJakob Unterwurzacher2016-09-28 23:30:13 +0200
commitbce96b5095798521e5b4d63dc1aa2078f20aaa50 (patch)
tree0852b51c09837486fe6ce439f0fe379324a904f0 /internal/fusefrontend_reverse/virtualfile.go
parent35fb6583e6bc5547ec72c00edbc3f53b55587b48 (diff)
reverse: move newDirIVFile into virtualfile.go
After all, is's a virtual file.
Diffstat (limited to 'internal/fusefrontend_reverse/virtualfile.go')
-rw-r--r--internal/fusefrontend_reverse/virtualfile.go9
1 files changed, 9 insertions, 0 deletions
diff --git a/internal/fusefrontend_reverse/virtualfile.go b/internal/fusefrontend_reverse/virtualfile.go
index 5373b48..351cbdc 100644
--- a/internal/fusefrontend_reverse/virtualfile.go
+++ b/internal/fusefrontend_reverse/virtualfile.go
@@ -8,6 +8,15 @@ import (
"github.com/hanwen/go-fuse/fuse/nodefs"
)
+func (rfs *reverseFS) newDirIVFile(cRelPath string) (nodefs.File, fuse.Status) {
+ cDir := saneDir(cRelPath)
+ absDir, err := rfs.abs(rfs.decryptPath(cDir))
+ if err != nil {
+ return nil, fuse.ToStatus(err)
+ }
+ return rfs.NewVirtualFile(derivePathIV(cDir), absDir)
+}
+
type virtualFile struct {
// Embed nodefs.defaultFile for a ENOSYS implementation of all methods
nodefs.File