diff options
author | Jakob Unterwurzacher | 2016-08-25 00:14:36 +0200 |
---|---|---|
committer | Jakob Unterwurzacher | 2016-09-25 16:43:17 +0200 |
commit | 9237b4f53e13075b595131f68edcfb2c831d684e (patch) | |
tree | cba9163085dfb18ca8db4c62ca71c24bd6ff804b /internal/fusefrontend_reverse/rfile.go | |
parent | f6d4d240e6e17f8052cdecd11533a1e24b339985 (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.go | 27 |
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 +} |