aboutsummaryrefslogtreecommitdiff
path: root/internal/fusefrontend_reverse/virtualfile.go
diff options
context:
space:
mode:
authorJakob Unterwurzacher2020-08-01 22:28:25 +0200
committerJakob Unterwurzacher2020-08-01 22:28:25 +0200
commit6c26cda53122df871befd0c1e08b892e0d56d31e (patch)
treec3c31f747cd695e0961ecb36d7710a759c408816 /internal/fusefrontend_reverse/virtualfile.go
parentf54d21c38427e68b598546c1c870a289cb5e99bb (diff)
v2api/reverse: implement Readdir
Diffstat (limited to 'internal/fusefrontend_reverse/virtualfile.go')
-rw-r--r--internal/fusefrontend_reverse/virtualfile.go15
1 files changed, 15 insertions, 0 deletions
diff --git a/internal/fusefrontend_reverse/virtualfile.go b/internal/fusefrontend_reverse/virtualfile.go
new file mode 100644
index 0000000..a92c127
--- /dev/null
+++ b/internal/fusefrontend_reverse/virtualfile.go
@@ -0,0 +1,15 @@
+package fusefrontend_reverse
+
+import (
+ "syscall"
+)
+
+const (
+ // virtualFileMode is the mode to use for virtual files (gocryptfs.diriv and
+ // *.name). They are always readable, as stated in func Access
+ virtualFileMode = syscall.S_IFREG | 0444
+ // We use inomap's `Tag` feature to generate unique inode numbers for
+ // virtual files. These are the tags we use.
+ inoTagDirIV = 1
+ inoTagNameFile = 2
+)