Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
go-fuse
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Levin Zimmermann
go-fuse
Commits
c5ba5de9
Commit
c5ba5de9
authored
Mar 29, 2019
by
Han-Wen Nienhuys
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
example/multizip: use new nodefs package.
parent
bfaeb760
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
7 deletions
+11
-7
example/multizip/main.go
example/multizip/main.go
+11
-7
No files found.
example/multizip/main.go
View file @
c5ba5de9
...
...
@@ -9,9 +9,9 @@ import (
"fmt"
"os"
"path/filepath"
"time"
"github.com/hanwen/go-fuse/fuse/nodefs"
"github.com/hanwen/go-fuse/fuse/pathfs"
"github.com/hanwen/go-fuse/nodefs"
"github.com/hanwen/go-fuse/zipfs"
)
...
...
@@ -25,15 +25,19 @@ func main() {
os
.
Exit
(
2
)
}
fs
:=
zipfs
.
NewMultiZipFs
()
nfs
:=
pathfs
.
NewPathNodeFs
(
fs
,
nil
)
opts
:=
nodefs
.
NewOptions
()
fs
:=
&
zipfs
.
MultiZipFs
{}
sec
:=
time
.
Second
opts
:=
nodefs
.
Options
{
EntryTimeout
:
&
sec
,
AttrTimeout
:
&
sec
,
DefaultPermissions
:
true
,
}
opts
.
Debug
=
*
debug
s
tate
,
_
,
err
:=
nodefs
.
MountRoot
(
flag
.
Arg
(
0
),
nfs
.
Root
(),
opts
)
s
erver
,
err
:=
nodefs
.
Mount
(
flag
.
Arg
(
0
),
fs
,
&
opts
)
if
err
!=
nil
{
fmt
.
Printf
(
"Mount fail: %v
\n
"
,
err
)
os
.
Exit
(
1
)
}
s
tate
.
Serve
()
s
erver
.
Serve
()
}
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