Commit 968a761e authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent 0e64f33a
......@@ -309,48 +309,9 @@ type BigFileData struct {
}
// ---- ctors ---- XXX to down?
func NewBigFileRoot(zstor zodb.IStorage) *BigFileRoot {
return &BigFileRoot{
Node: nodefs.NewDefaultNode(),
zstor: zstor,
tab: make(map[zodb.Oid]*BigFileDir),
}
}
// func NewBigFileDir(oid zodb.Oid, root *BigFileRoot) *BigFileDir {
// bx := &BigFileDir{
// Node: nodefs.NewDefaultNode(),
// oid: oid,
// //root: root,
// }
//
// return bx
// }
// func NewBigFileHead(x *BigFileDir) *BigFileHead {
// f := &BigFileHead{Node: nodefs.NewDefaultNode(), x: x}
// f.data = NewBigFileData(f)
// /bigfile -> Mkdir receives client request to create /bigfile/<bigfileX>.
//
// // XXX + .at
//
// return f
// }
// func NewBigFileData(head *BigFileHead) *BigFileData {
// return &BigFileData{Node: nodefs.NewDefaultNode(), parent: head}
// }
// Mkdir receives client request to create /bigfile/<bigfileX>.
// It creates <bigfileX>/head/data along the way.
func (bfroot *BigFileRoot) Mkdir(name string, mode uint32, fctx *fuse.Context) (*nodefs.Inode, fuse.Status) {
oid, err := zodb.ParseOid(name)
if err != nil {
......@@ -530,7 +491,11 @@ func main() {
// add entries to /
mkfile(root, ".wcfs", NewStaticFile([]byte(zurl)))
mkdir(root, "bigfile", NewBigFileRoot(zstor))
mkdir(root, "bigfile", &BigFileRoot{
Node: nodefs.NewDefaultNode(),
zstor: zstor,
tab: make(map[zodb.Oid]*BigFileDir),
})
// TODO handle autoexit
_ = autoexit
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment