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
ae9d3bcc
Commit
ae9d3bcc
authored
Sep 05, 2011
by
Han-Wen Nienhuys
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix the examples.
parent
9c09165d
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
7 additions
and
17 deletions
+7
-17
example/autounionfs/main.go
example/autounionfs/main.go
+1
-1
example/hello/hello.go
example/hello/hello.go
+1
-1
example/loopback/loopback.go
example/loopback/loopback.go
+1
-1
example/multizip/multizip.go
example/multizip/multizip.go
+1
-1
example/unionfs/main.go
example/unionfs/main.go
+1
-1
example/zipfs/main.go
example/zipfs/main.go
+2
-12
No files found.
example/autounionfs/main.go
View file @
ae9d3bcc
...
@@ -45,7 +45,7 @@ func main() {
...
@@ -45,7 +45,7 @@ func main() {
gofs
:=
unionfs
.
NewAutoUnionFs
(
flag
.
Arg
(
1
),
options
)
gofs
:=
unionfs
.
NewAutoUnionFs
(
flag
.
Arg
(
1
),
options
)
state
,
conn
,
err
:=
fuse
.
MountFileSystem
(
flag
.
Arg
(
0
),
gofs
,
nil
)
state
,
conn
,
err
:=
fuse
.
Mount
Path
FileSystem
(
flag
.
Arg
(
0
),
gofs
,
nil
)
if
err
!=
nil
{
if
err
!=
nil
{
fmt
.
Printf
(
"Mount fail: %v
\n
"
,
err
)
fmt
.
Printf
(
"Mount fail: %v
\n
"
,
err
)
os
.
Exit
(
1
)
os
.
Exit
(
1
)
...
...
example/hello/hello.go
View file @
ae9d3bcc
...
@@ -52,7 +52,7 @@ func main() {
...
@@ -52,7 +52,7 @@ func main() {
if
len
(
flag
.
Args
())
<
1
{
if
len
(
flag
.
Args
())
<
1
{
log
.
Fatal
(
"Usage:
\n
hello MOUNTPOINT"
)
log
.
Fatal
(
"Usage:
\n
hello MOUNTPOINT"
)
}
}
state
,
_
,
err
:=
fuse
.
MountFileSystem
(
flag
.
Arg
(
0
),
&
HelloFs
{},
nil
)
state
,
_
,
err
:=
fuse
.
Mount
Path
FileSystem
(
flag
.
Arg
(
0
),
&
HelloFs
{},
nil
)
if
err
!=
nil
{
if
err
!=
nil
{
log
.
Fatal
(
"Mount fail: %v
\n
"
,
err
)
log
.
Fatal
(
"Mount fail: %v
\n
"
,
err
)
}
}
...
...
example/loopback/loopback.go
View file @
ae9d3bcc
...
@@ -52,7 +52,7 @@ func main() {
...
@@ -52,7 +52,7 @@ func main() {
finalFs
=
debugFs
finalFs
=
debugFs
}
}
conn
:=
fuse
.
NewFileSystemConnector
(
f
inalFs
,
opts
)
conn
:=
fuse
.
NewFileSystemConnector
(
f
use
.
NewPathNodeFs
(
finalFs
)
,
opts
)
var
finalRawFs
fuse
.
RawFileSystem
=
conn
var
finalRawFs
fuse
.
RawFileSystem
=
conn
if
*
latencies
{
if
*
latencies
{
rawTiming
:=
fuse
.
NewTimingRawFileSystem
(
conn
)
rawTiming
:=
fuse
.
NewTimingRawFileSystem
(
conn
)
...
...
example/multizip/multizip.go
View file @
ae9d3bcc
...
@@ -22,7 +22,7 @@ func main() {
...
@@ -22,7 +22,7 @@ func main() {
}
}
fs
:=
zipfs
.
NewMultiZipFs
()
fs
:=
zipfs
.
NewMultiZipFs
()
state
,
_
,
err
:=
fuse
.
MountFileSystem
(
flag
.
Arg
(
0
),
fs
,
nil
)
state
,
_
,
err
:=
fuse
.
Mount
Path
FileSystem
(
flag
.
Arg
(
0
),
fs
,
nil
)
if
err
!=
nil
{
if
err
!=
nil
{
fmt
.
Printf
(
"Mount fail: %v
\n
"
,
err
)
fmt
.
Printf
(
"Mount fail: %v
\n
"
,
err
)
os
.
Exit
(
1
)
os
.
Exit
(
1
)
...
...
example/unionfs/main.go
View file @
ae9d3bcc
...
@@ -34,7 +34,7 @@ func main() {
...
@@ -34,7 +34,7 @@ func main() {
log
.
Fatal
(
"Cannot create UnionFs"
,
err
)
log
.
Fatal
(
"Cannot create UnionFs"
,
err
)
os
.
Exit
(
1
)
os
.
Exit
(
1
)
}
}
mountState
,
_
,
err
:=
fuse
.
MountFileSystem
(
flag
.
Arg
(
0
),
ufs
,
nil
)
mountState
,
_
,
err
:=
fuse
.
Mount
Path
FileSystem
(
flag
.
Arg
(
0
),
ufs
,
nil
)
if
err
!=
nil
{
if
err
!=
nil
{
log
.
Fatal
(
"Mount fail:"
,
err
)
log
.
Fatal
(
"Mount fail:"
,
err
)
}
}
...
...
example/zipfs/main.go
View file @
ae9d3bcc
...
@@ -22,29 +22,19 @@ func main() {
...
@@ -22,29 +22,19 @@ func main() {
os
.
Exit
(
2
)
os
.
Exit
(
2
)
}
}
var
fs
fuse
.
FileSystem
var
fs
fuse
.
Node
FileSystem
fs
,
err
:=
zipfs
.
NewArchiveFileSystem
(
flag
.
Arg
(
1
))
fs
,
err
:=
zipfs
.
NewArchiveFileSystem
(
flag
.
Arg
(
1
))
if
err
!=
nil
{
if
err
!=
nil
{
fmt
.
Fprintf
(
os
.
Stderr
,
"NewArchiveFileSystem failed: %v
\n
"
,
err
)
fmt
.
Fprintf
(
os
.
Stderr
,
"NewArchiveFileSystem failed: %v
\n
"
,
err
)
os
.
Exit
(
1
)
os
.
Exit
(
1
)
}
}
debugFs
:=
fuse
.
NewFileSystemDebug
()
if
*
latencies
{
state
,
_
,
err
:=
fuse
.
MountNodeFileSystem
(
flag
.
Arg
(
0
),
fs
,
nil
)
debugFs
.
FileSystem
=
fs
fs
=
debugFs
}
state
,
_
,
err
:=
fuse
.
MountFileSystem
(
flag
.
Arg
(
0
),
fs
,
nil
)
if
err
!=
nil
{
if
err
!=
nil
{
fmt
.
Printf
(
"Mount fail: %v
\n
"
,
err
)
fmt
.
Printf
(
"Mount fail: %v
\n
"
,
err
)
os
.
Exit
(
1
)
os
.
Exit
(
1
)
}
}
if
*
latencies
{
debugFs
.
AddMountState
(
state
)
}
state
.
SetRecordStatistics
(
*
latencies
)
state
.
SetRecordStatistics
(
*
latencies
)
state
.
Debug
=
*
debug
state
.
Debug
=
*
debug
state
.
Loop
(
true
)
state
.
Loop
(
true
)
...
...
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