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
d4933eb8
Commit
d4933eb8
authored
Apr 30, 2011
by
Han-Wen Nienhuys
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Minimize number of bytes/string conversions in request.{filename,filenames}.
parent
05abe73d
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
4 deletions
+8
-4
fuse/fuse.go
fuse/fuse.go
+8
-4
No files found.
fuse/fuse.go
View file @
d4933eb8
...
...
@@ -4,11 +4,11 @@
package
fuse
import
(
"bytes"
"fmt"
"log"
"os"
"reflect"
"strings"
"syscall"
"time"
"unsafe"
...
...
@@ -45,14 +45,18 @@ type request struct {
}
func
(
me
*
request
)
filename
()
string
{
return
string
s
.
TrimRight
(
string
(
me
.
arg
),
"
\x00
"
)
return
string
(
me
.
arg
[
:
len
(
me
.
arg
)
-
1
]
)
}
func
(
me
*
request
)
filenames
(
count
int
)
[]
string
{
return
strings
.
Split
(
string
(
me
.
arg
),
"
\x00
"
,
count
)
names
:=
bytes
.
Split
(
me
.
arg
[
:
len
(
me
.
arg
)
-
1
],
[]
byte
{
0
},
count
)
nameStrings
:=
make
([]
string
,
len
(
names
))
for
i
,
n
:=
range
names
{
nameStrings
[
i
]
=
string
(
n
)
}
return
nameStrings
}
////////////////////////////////////////////////////////////////
// State related to this mount point.
type
MountState
struct
{
...
...
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