summaryrefslogtreecommitdiff
path: root/frontend/fs.go
diff options
context:
space:
mode:
authorJakob Unterwurzacher2015-09-04 20:31:06 +0200
committerJakob Unterwurzacher2015-09-04 20:37:37 +0200
commit6f90ec716a0e486628297a8d74e9f4d8d895e744 (patch)
tree66261a242910310edd4db12455de3970ed23e2fb /frontend/fs.go
parent779ad6dda3d7926c1f68e72600a5db3764e6039d (diff)
Rebase to cluefs
https://github.com/airnandez/cluefs
Diffstat (limited to 'frontend/fs.go')
-rw-r--r--frontend/fs.go29
1 files changed, 15 insertions, 14 deletions
diff --git a/frontend/fs.go b/frontend/fs.go
index 637d134..ba6ad09 100644
--- a/frontend/fs.go
+++ b/frontend/fs.go
@@ -2,25 +2,26 @@ package frontend
import (
"github.com/rfjakob/gocryptfs/cryptfs"
- "bazil.org/fuse/fs"
+ "github.com/rfjakob/cluefs/lib/cluefs"
)
type FS struct {
- *cryptfs.FS
- backing string
+ *cryptfs.CryptFS
+ *cluefs.ClueFS
}
-func New(key [16]byte, b string) *FS {
- return &FS {
- FS: cryptfs.NewFS(key),
- backing: b,
- }
-}
+type nullTracer struct {}
-func (fs *FS) Root() (fs.Node, error) {
- n := Node{
- backing: "",
- parentFS: fs,
+func (nullTracer) Trace(op cluefs.FsOperTracer) {}
+
+func NewFS(key [16]byte, backing string) *FS {
+ var nt nullTracer
+ clfs, err := cluefs.NewClueFS(backing, nt)
+ if err != nil {
+ panic(err)
+ }
+ return &FS {
+ CryptFS: cryptfs.NewCryptFS(key),
+ ClueFS: clfs,
}
- return n, nil
}