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
e975a7da
Commit
e975a7da
authored
May 25, 2011
by
Han-Wen Nienhuys
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move ReverseJoin and CurrentOwner into misc.go.
parent
75dc7589
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
15 deletions
+16
-15
fuse/misc.go
fuse/misc.go
+16
-0
fuse/pathfilesystem.go
fuse/pathfilesystem.go
+0
-15
No files found.
fuse/misc.go
View file @
e975a7da
...
@@ -170,3 +170,19 @@ func ioctl(fd int, cmd int, arg uintptr) (int, int) {
...
@@ -170,3 +170,19 @@ func ioctl(fd int, cmd int, arg uintptr) (int, int) {
func
Version
()
string
{
func
Version
()
string
{
return
version
return
version
}
}
func
ReverseJoin
(
rev_components
[]
string
,
sep
string
)
string
{
components
:=
make
([]
string
,
len
(
rev_components
))
for
i
,
v
:=
range
rev_components
{
components
[
len
(
rev_components
)
-
i
-
1
]
=
v
}
return
strings
.
Join
(
components
,
sep
)
}
func
CurrentOwner
()
*
Owner
{
return
&
Owner
{
Uid
:
uint32
(
os
.
Getuid
()),
Gid
:
uint32
(
os
.
Getgid
()),
}
}
fuse/pathfilesystem.go
View file @
e975a7da
...
@@ -207,14 +207,6 @@ func (me *inode) GetFullPath() (path string) {
...
@@ -207,14 +207,6 @@ func (me *inode) GetFullPath() (path string) {
return
ReverseJoin
(
rev_components
,
"/"
)
return
ReverseJoin
(
rev_components
,
"/"
)
}
}
func
ReverseJoin
(
rev_components
[]
string
,
sep
string
)
string
{
components
:=
make
([]
string
,
len
(
rev_components
))
for
i
,
v
:=
range
rev_components
{
components
[
len
(
rev_components
)
-
i
-
1
]
=
v
}
return
strings
.
Join
(
components
,
sep
)
}
func
(
me
*
inode
)
GetPath
()
(
path
string
,
mount
*
mountData
)
{
func
(
me
*
inode
)
GetPath
()
(
path
string
,
mount
*
mountData
)
{
if
me
.
NodeId
!=
FUSE_ROOT_ID
&&
me
.
Parent
==
nil
{
if
me
.
NodeId
!=
FUSE_ROOT_ID
&&
me
.
Parent
==
nil
{
// Deleted node. Treat as if the filesystem was unmounted.
// Deleted node. Treat as if the filesystem was unmounted.
...
@@ -277,13 +269,6 @@ func (me *inode) setParent(newParent *inode) {
...
@@ -277,13 +269,6 @@ func (me *inode) setParent(newParent *inode) {
}
}
}
}
func
CurrentOwner
()
*
Owner
{
return
&
Owner
{
Uid
:
uint32
(
os
.
Getuid
()),
Gid
:
uint32
(
os
.
Getgid
()),
}
}
func
NewFileSystemOptions
()
*
FileSystemOptions
{
func
NewFileSystemOptions
()
*
FileSystemOptions
{
return
&
FileSystemOptions
{
return
&
FileSystemOptions
{
NegativeTimeout
:
0.0
,
NegativeTimeout
:
0.0
,
...
...
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