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
Kirill Smelkov
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
...
@@ -5,6 +5,7 @@ package fuse
import
(
import
(
"bytes"
"bytes"
"log"
"log"
"reflect"
"time"
"time"
"github.com/hanwen/go-fuse/raw"
"github.com/hanwen/go-fuse/raw"
...
@@ -16,7 +17,13 @@ func (c *FileSystemConnector) String() string {
...
@@ -16,7 +17,13 @@ func (c *FileSystemConnector) String() string {
if
c
.
rootNode
==
nil
||
c
.
rootNode
.
mount
==
nil
{
if
c
.
rootNode
==
nil
||
c
.
rootNode
.
mount
==
nil
{
return
"go-fuse:unmounted"
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
)
{
func
(
c
*
FileSystemConnector
)
Init
(
fsInit
*
RawFsInit
)
{
...
...
fuse/pathfs.go
View file @
90b2a0f3
package
fuse
package
fuse
import
(
import
(
"fmt"
"log"
"log"
"path/filepath"
"path/filepath"
"reflect"
"sync"
"sync"
)
)
...
@@ -88,7 +88,11 @@ func (fs *PathNodeFs) OnUnmount() {
...
@@ -88,7 +88,11 @@ func (fs *PathNodeFs) OnUnmount() {
}
}
func
(
fs
*
PathNodeFs
)
String
()
string
{
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
)
{
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