Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
W
wendelin.core
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
Kirill Smelkov
wendelin.core
Commits
968a761e
Commit
968a761e
authored
Oct 01, 2018
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
0e64f33a
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
42 deletions
+7
-42
wcfs/wcfs.go
wcfs/wcfs.go
+7
-42
No files found.
wcfs/wcfs.go
View file @
968a761e
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment