aboutsummaryrefslogtreecommitdiff
path: root/internal/fusefrontend_reverse/rfile.go
diff options
context:
space:
mode:
authorJakob Unterwurzacher2016-08-25 00:14:36 +0200
committerJakob Unterwurzacher2016-09-25 16:43:17 +0200
commit9237b4f53e13075b595131f68edcfb2c831d684e (patch)
treecba9163085dfb18ca8db4c62ca71c24bd6ff804b /internal/fusefrontend_reverse/rfile.go
parentf6d4d240e6e17f8052cdecd11533a1e24b339985 (diff)
reverse: add skeleton
Compiles but does not do much else.
Diffstat (limited to 'internal/fusefrontend_reverse/rfile.go')
-rw-r--r--internal/fusefrontend_reverse/rfile.go27
1 files changed, 27 insertions, 0 deletions
diff --git a/internal/fusefrontend_reverse/rfile.go b/internal/fusefrontend_reverse/rfile.go
new file mode 100644
index 0000000..746a0d6
--- /dev/null
+++ b/internal/fusefrontend_reverse/rfile.go
@@ -0,0 +1,27 @@
+package fusefrontend_reverse
+
+import (
+ "os"
+
+ "github.com/hanwen/go-fuse/fuse"
+ "github.com/hanwen/go-fuse/fuse/nodefs"
+
+ "github.com/rfjakob/gocryptfs/internal/contentenc"
+)
+
+type file struct {
+ fd *os.File
+ // Content encryption helper
+ contentEnc *contentenc.ContentEnc
+
+ // nodefs.defaultFile returns ENOSYS for all operations
+ nodefs.File
+}
+
+func NewFile(fd *os.File, contentEnc *contentenc.ContentEnc) (nodefs.File, fuse.Status) {
+ return &file{
+ fd: fd,
+ contentEnc: contentEnc,
+ File: nodefs.NewDefaultFile(),
+ }, fuse.OK
+}