aboutsummaryrefslogtreecommitdiff
path: root/internal/fusefrontend_reverse/virtualfile.go
diff options
context:
space:
mode:
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
+)