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
b423903e
Commit
b423903e
authored
Mar 22, 2019
by
Han-Wen Nienhuys
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
nodefs: docstrings
parent
d66ea923
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
0 deletions
+14
-0
nodefs/default.go
nodefs/default.go
+14
-0
No files found.
nodefs/default.go
View file @
b423903e
...
@@ -161,6 +161,7 @@ func (n *DefaultOperations) Rename(ctx context.Context, name string, newParent O
...
@@ -161,6 +161,7 @@ func (n *DefaultOperations) Rename(ctx context.Context, name string, newParent O
return
fuse
.
EROFS
return
fuse
.
EROFS
}
}
// Read delegates to the FileHandle argument.
func
(
n
*
DefaultOperations
)
Read
(
ctx
context
.
Context
,
f
FileHandle
,
dest
[]
byte
,
off
int64
)
(
fuse
.
ReadResult
,
fuse
.
Status
)
{
func
(
n
*
DefaultOperations
)
Read
(
ctx
context
.
Context
,
f
FileHandle
,
dest
[]
byte
,
off
int64
)
(
fuse
.
ReadResult
,
fuse
.
Status
)
{
if
f
!=
nil
{
if
f
!=
nil
{
return
f
.
Read
(
ctx
,
dest
,
off
)
return
f
.
Read
(
ctx
,
dest
,
off
)
...
@@ -173,10 +174,12 @@ func (n *DefaultOperations) Symlink(ctx context.Context, target, name string, ou
...
@@ -173,10 +174,12 @@ func (n *DefaultOperations) Symlink(ctx context.Context, target, name string, ou
return
nil
,
fuse
.
EROFS
return
nil
,
fuse
.
EROFS
}
}
// Readlink return ENOTSUP
func
(
n
*
DefaultOperations
)
Readlink
(
ctx
context
.
Context
)
(
string
,
fuse
.
Status
)
{
func
(
n
*
DefaultOperations
)
Readlink
(
ctx
context
.
Context
)
(
string
,
fuse
.
Status
)
{
return
""
,
fuse
.
ENOTSUP
return
""
,
fuse
.
ENOTSUP
}
}
// Fsync delegates to the FileHandle
func
(
n
*
DefaultOperations
)
Fsync
(
ctx
context
.
Context
,
f
FileHandle
,
flags
uint32
)
fuse
.
Status
{
func
(
n
*
DefaultOperations
)
Fsync
(
ctx
context
.
Context
,
f
FileHandle
,
flags
uint32
)
fuse
.
Status
{
if
f
!=
nil
{
if
f
!=
nil
{
return
f
.
Fsync
(
ctx
,
flags
)
return
f
.
Fsync
(
ctx
,
flags
)
...
@@ -184,6 +187,7 @@ func (n *DefaultOperations) Fsync(ctx context.Context, f FileHandle, flags uint3
...
@@ -184,6 +187,7 @@ func (n *DefaultOperations) Fsync(ctx context.Context, f FileHandle, flags uint3
return
fuse
.
ENOTSUP
return
fuse
.
ENOTSUP
}
}
// Write delegates to the FileHandle
func
(
n
*
DefaultOperations
)
Write
(
ctx
context
.
Context
,
f
FileHandle
,
data
[]
byte
,
off
int64
)
(
written
uint32
,
status
fuse
.
Status
)
{
func
(
n
*
DefaultOperations
)
Write
(
ctx
context
.
Context
,
f
FileHandle
,
data
[]
byte
,
off
int64
)
(
written
uint32
,
status
fuse
.
Status
)
{
if
f
!=
nil
{
if
f
!=
nil
{
return
f
.
Write
(
ctx
,
data
,
off
)
return
f
.
Write
(
ctx
,
data
,
off
)
...
@@ -192,6 +196,7 @@ func (n *DefaultOperations) Write(ctx context.Context, f FileHandle, data []byte
...
@@ -192,6 +196,7 @@ func (n *DefaultOperations) Write(ctx context.Context, f FileHandle, data []byte
return
0
,
fuse
.
EROFS
return
0
,
fuse
.
EROFS
}
}
// GetLk delegates to the FileHandlef
func
(
n
*
DefaultOperations
)
GetLk
(
ctx
context
.
Context
,
f
FileHandle
,
owner
uint64
,
lk
*
fuse
.
FileLock
,
flags
uint32
,
out
*
fuse
.
FileLock
)
(
status
fuse
.
Status
)
{
func
(
n
*
DefaultOperations
)
GetLk
(
ctx
context
.
Context
,
f
FileHandle
,
owner
uint64
,
lk
*
fuse
.
FileLock
,
flags
uint32
,
out
*
fuse
.
FileLock
)
(
status
fuse
.
Status
)
{
if
f
!=
nil
{
if
f
!=
nil
{
return
f
.
GetLk
(
ctx
,
owner
,
lk
,
flags
,
out
)
return
f
.
GetLk
(
ctx
,
owner
,
lk
,
flags
,
out
)
...
@@ -200,6 +205,7 @@ func (n *DefaultOperations) GetLk(ctx context.Context, f FileHandle, owner uint6
...
@@ -200,6 +205,7 @@ func (n *DefaultOperations) GetLk(ctx context.Context, f FileHandle, owner uint6
return
fuse
.
ENOTSUP
return
fuse
.
ENOTSUP
}
}
// SetLk delegates to the FileHandle
func
(
n
*
DefaultOperations
)
SetLk
(
ctx
context
.
Context
,
f
FileHandle
,
owner
uint64
,
lk
*
fuse
.
FileLock
,
flags
uint32
)
(
status
fuse
.
Status
)
{
func
(
n
*
DefaultOperations
)
SetLk
(
ctx
context
.
Context
,
f
FileHandle
,
owner
uint64
,
lk
*
fuse
.
FileLock
,
flags
uint32
)
(
status
fuse
.
Status
)
{
if
f
!=
nil
{
if
f
!=
nil
{
return
f
.
SetLk
(
ctx
,
owner
,
lk
,
flags
)
return
f
.
SetLk
(
ctx
,
owner
,
lk
,
flags
)
...
@@ -208,6 +214,7 @@ func (n *DefaultOperations) SetLk(ctx context.Context, f FileHandle, owner uint6
...
@@ -208,6 +214,7 @@ func (n *DefaultOperations) SetLk(ctx context.Context, f FileHandle, owner uint6
return
fuse
.
ENOTSUP
return
fuse
.
ENOTSUP
}
}
// SetLkw delegates to the FileHandle
func
(
n
*
DefaultOperations
)
SetLkw
(
ctx
context
.
Context
,
f
FileHandle
,
owner
uint64
,
lk
*
fuse
.
FileLock
,
flags
uint32
)
(
status
fuse
.
Status
)
{
func
(
n
*
DefaultOperations
)
SetLkw
(
ctx
context
.
Context
,
f
FileHandle
,
owner
uint64
,
lk
*
fuse
.
FileLock
,
flags
uint32
)
(
status
fuse
.
Status
)
{
if
f
!=
nil
{
if
f
!=
nil
{
return
f
.
SetLkw
(
ctx
,
owner
,
lk
,
flags
)
return
f
.
SetLkw
(
ctx
,
owner
,
lk
,
flags
)
...
@@ -215,6 +222,8 @@ func (n *DefaultOperations) SetLkw(ctx context.Context, f FileHandle, owner uint
...
@@ -215,6 +222,8 @@ func (n *DefaultOperations) SetLkw(ctx context.Context, f FileHandle, owner uint
return
fuse
.
ENOTSUP
return
fuse
.
ENOTSUP
}
}
// Flush delegates to the FileHandle
func
(
n
*
DefaultOperations
)
Flush
(
ctx
context
.
Context
,
f
FileHandle
)
fuse
.
Status
{
func
(
n
*
DefaultOperations
)
Flush
(
ctx
context
.
Context
,
f
FileHandle
)
fuse
.
Status
{
if
f
!=
nil
{
if
f
!=
nil
{
return
f
.
Flush
(
ctx
)
return
f
.
Flush
(
ctx
)
...
@@ -223,6 +232,7 @@ func (n *DefaultOperations) Flush(ctx context.Context, f FileHandle) fuse.Status
...
@@ -223,6 +232,7 @@ func (n *DefaultOperations) Flush(ctx context.Context, f FileHandle) fuse.Status
return
fuse
.
ENOTSUP
return
fuse
.
ENOTSUP
}
}
// Release delegates to the FileHandle
func
(
n
*
DefaultOperations
)
Release
(
ctx
context
.
Context
,
f
FileHandle
)
fuse
.
Status
{
func
(
n
*
DefaultOperations
)
Release
(
ctx
context
.
Context
,
f
FileHandle
)
fuse
.
Status
{
if
f
!=
nil
{
if
f
!=
nil
{
return
f
.
Release
(
ctx
)
return
f
.
Release
(
ctx
)
...
@@ -230,6 +240,7 @@ func (n *DefaultOperations) Release(ctx context.Context, f FileHandle) fuse.Stat
...
@@ -230,6 +240,7 @@ func (n *DefaultOperations) Release(ctx context.Context, f FileHandle) fuse.Stat
return
fuse
.
OK
return
fuse
.
OK
}
}
// Allocate delegates to the FileHandle
func
(
n
*
DefaultOperations
)
Allocate
(
ctx
context
.
Context
,
f
FileHandle
,
off
uint64
,
size
uint64
,
mode
uint32
)
(
status
fuse
.
Status
)
{
func
(
n
*
DefaultOperations
)
Allocate
(
ctx
context
.
Context
,
f
FileHandle
,
off
uint64
,
size
uint64
,
mode
uint32
)
(
status
fuse
.
Status
)
{
if
f
!=
nil
{
if
f
!=
nil
{
return
f
.
Allocate
(
ctx
,
off
,
size
,
mode
)
return
f
.
Allocate
(
ctx
,
off
,
size
,
mode
)
...
@@ -247,14 +258,17 @@ func (n *DefaultOperations) FGetAttr(ctx context.Context, f FileHandle, out *fus
...
@@ -247,14 +258,17 @@ func (n *DefaultOperations) FGetAttr(ctx context.Context, f FileHandle, out *fus
return
n
.
inode_
.
ops
.
GetAttr
(
ctx
,
out
)
return
n
.
inode_
.
ops
.
GetAttr
(
ctx
,
out
)
}
}
// Open returns ENOTSUP
func
(
n
*
DefaultOperations
)
Open
(
ctx
context
.
Context
,
flags
uint32
)
(
fh
FileHandle
,
fuseFlags
uint32
,
status
fuse
.
Status
)
{
func
(
n
*
DefaultOperations
)
Open
(
ctx
context
.
Context
,
flags
uint32
)
(
fh
FileHandle
,
fuseFlags
uint32
,
status
fuse
.
Status
)
{
return
nil
,
0
,
fuse
.
ENOTSUP
return
nil
,
0
,
fuse
.
ENOTSUP
}
}
// Create returns ENOTSUP
func
(
n
*
DefaultOperations
)
Create
(
ctx
context
.
Context
,
name
string
,
flags
uint32
,
mode
uint32
)
(
node
*
Inode
,
fh
FileHandle
,
fuseFlags
uint32
,
status
fuse
.
Status
)
{
func
(
n
*
DefaultOperations
)
Create
(
ctx
context
.
Context
,
name
string
,
flags
uint32
,
mode
uint32
)
(
node
*
Inode
,
fh
FileHandle
,
fuseFlags
uint32
,
status
fuse
.
Status
)
{
return
nil
,
nil
,
0
,
fuse
.
EROFS
return
nil
,
nil
,
0
,
fuse
.
EROFS
}
}
// Link returns ENOTSUP
func
(
n
*
DefaultOperations
)
Link
(
ctx
context
.
Context
,
target
Operations
,
name
string
,
out
*
fuse
.
EntryOut
)
(
node
*
Inode
,
status
fuse
.
Status
)
{
func
(
n
*
DefaultOperations
)
Link
(
ctx
context
.
Context
,
target
Operations
,
name
string
,
out
*
fuse
.
EntryOut
)
(
node
*
Inode
,
status
fuse
.
Status
)
{
return
nil
,
fuse
.
EROFS
return
nil
,
fuse
.
EROFS
}
}
...
...
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