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
c614b5b8
Commit
c614b5b8
authored
Jun 19, 2011
by
Han-Wen Nienhuys
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update for Go weekly.2011-06-16
parent
b68d8e7f
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
8 deletions
+9
-8
example/bulkstat/bulkstat.go
example/bulkstat/bulkstat.go
+4
-5
fuse/pathdebug.go
fuse/pathdebug.go
+3
-1
unionfs/autounion.go
unionfs/autounion.go
+2
-2
No files found.
example/bulkstat/bulkstat.go
View file @
c614b5b8
...
...
@@ -4,7 +4,7 @@ package main
// in parallel. This is useful for benchmarking purposes.
import
(
"
encoding/line
"
"
bufio
"
"flag"
"fmt"
"github.com/hanwen/go-fuse/fuse"
...
...
@@ -31,8 +31,7 @@ func main() {
panic
(
"err"
+
err
.
String
())
}
linelen
:=
1000
reader
:=
line
.
NewReader
(
f
,
linelen
)
reader
:=
bufio
.
NewReader
(
f
)
files
:=
make
([]
string
,
0
)
for
{
...
...
@@ -64,8 +63,8 @@ func main() {
}
func
Analyze
(
times
[]
float64
)
{
sorted
:=
sort
.
Float64Array
(
times
)
sort
ed
.
Sort
(
)
sorted
:=
times
sort
.
SortFloat64s
(
sorted
)
tot
:=
0.0
for
_
,
v
:=
range
times
{
...
...
fuse/pathdebug.go
View file @
c614b5b8
...
...
@@ -51,8 +51,10 @@ func (me *FileSystemDebug) Open(path string, flags uint32) (fuseFile File, statu
return
me
.
FileSystem
.
Open
(
path
,
flags
)
}
var
SeparatorString
=
string
([]
byte
{
filepath
.
Separator
})
func
(
me
*
FileSystemDebug
)
getContent
(
path
string
)
[]
byte
{
comps
:=
strings
.
Split
(
path
,
filepath
.
SeparatorString
,
-
1
)
comps
:=
strings
.
Split
(
path
,
SeparatorString
,
-
1
)
if
comps
[
0
]
==
DebugDir
{
me
.
RWMutex
.
RLock
()
defer
me
.
RWMutex
.
RUnlock
()
...
...
unionfs/autounion.go
View file @
c614b5b8
...
...
@@ -173,7 +173,7 @@ func (me *AutoUnionFs) updateKnownFses() {
}
func
(
me
*
AutoUnionFs
)
Readlink
(
path
string
)
(
out
string
,
code
fuse
.
Status
)
{
comps
:=
strings
.
Split
(
path
,
f
ilepath
.
SeparatorString
,
-
1
)
comps
:=
strings
.
Split
(
path
,
f
use
.
SeparatorString
,
-
1
)
if
comps
[
0
]
==
_STATUS
&&
comps
[
1
]
==
_ROOT
{
return
me
.
root
,
fuse
.
OK
}
...
...
@@ -265,7 +265,7 @@ func (me *AutoUnionFs) GetAttr(path string) (*os.FileInfo, fuse.Status) {
}
return
a
,
fuse
.
OK
}
comps
:=
strings
.
Split
(
path
,
f
ilepath
.
SeparatorString
,
-
1
)
comps
:=
strings
.
Split
(
path
,
f
use
.
SeparatorString
,
-
1
)
if
len
(
comps
)
>
1
&&
comps
[
0
]
==
_CONFIG
{
fs
:=
me
.
getUnionFs
(
comps
[
1
])
...
...
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