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
90b2a0f3
Commit
90b2a0f3
authored
May 30, 2012
by
Han-Wen Nienhuys
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use reflection to provide sensible default name.
parent
c057d5f1
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
3 deletions
+14
-3
fuse/fsops.go
fuse/fsops.go
+8
-1
fuse/pathfs.go
fuse/pathfs.go
+6
-2
No files found.
fuse/fsops.go
View file @
90b2a0f3
...
...
@@ -5,6 +5,7 @@ package fuse
import
(
"bytes"
"log"
"reflect"
"time"
"github.com/hanwen/go-fuse/raw"
...
...
@@ -16,7 +17,13 @@ func (c *FileSystemConnector) String() string {
if
c
.
rootNode
==
nil
||
c
.
rootNode
.
mount
==
nil
{
return
"go-fuse:unmounted"
}
return
c
.
rootNode
.
mount
.
fs
.
String
()
fs
:=
c
.
rootNode
.
mount
.
fs
name
:=
fs
.
String
()
if
name
==
"DefaultNodeFileSystem"
{
name
=
reflect
.
TypeOf
(
fs
)
.
Name
()
}
return
name
}
func
(
c
*
FileSystemConnector
)
Init
(
fsInit
*
RawFsInit
)
{
...
...
fuse/pathfs.go
View file @
90b2a0f3
package
fuse
import
(
"fmt"
"log"
"path/filepath"
"reflect"
"sync"
)
...
...
@@ -88,7 +88,11 @@ func (fs *PathNodeFs) OnUnmount() {
}
func
(
fs
*
PathNodeFs
)
String
()
string
{
return
fmt
.
Sprintf
(
"PathNodeFs(%v)"
,
fs
.
fs
)
name
:=
fs
.
fs
.
String
()
if
name
==
"DefaultFileSystem"
{
name
=
reflect
.
TypeOf
(
fs
.
fs
)
.
Name
()
}
return
name
}
func
(
fs
*
PathNodeFs
)
OnMount
(
conn
*
FileSystemConnector
)
{
...
...
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