Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
J
jacobsa-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
jacobsa-fuse
Commits
dfb1b2d8
Commit
dfb1b2d8
authored
Jul 27, 2015
by
Aaron Jacobs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed package memfs.
parent
ea210ae2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
0 deletions
+17
-0
samples/memfs/memfs.go
samples/memfs/memfs.go
+17
-0
No files found.
samples/memfs/memfs.go
View file @
dfb1b2d8
...
...
@@ -20,6 +20,8 @@ import (
"os"
"time"
"golang.org/x/net/context"
"github.com/jacobsa/fuse"
"github.com/jacobsa/fuse/fuseops"
"github.com/jacobsa/fuse/fuseutil"
...
...
@@ -190,6 +192,7 @@ func (fs *memFS) deallocateInode(id fuseops.InodeID) {
////////////////////////////////////////////////////////////////////////
func
(
fs
*
memFS
)
LookUpInode
(
ctx
context
.
Context
,
op
*
fuseops
.
LookUpInodeOp
)
(
err
error
)
{
fs
.
mu
.
Lock
()
defer
fs
.
mu
.
Unlock
()
...
...
@@ -220,6 +223,7 @@ func (fs *memFS) LookUpInode(
}
func
(
fs
*
memFS
)
GetInodeAttributes
(
ctx
context
.
Context
,
op
*
fuseops
.
GetInodeAttributesOp
)
(
err
error
)
{
fs
.
mu
.
Lock
()
defer
fs
.
mu
.
Unlock
()
...
...
@@ -238,6 +242,7 @@ func (fs *memFS) GetInodeAttributes(
}
func
(
fs
*
memFS
)
SetInodeAttributes
(
ctx
context
.
Context
,
op
*
fuseops
.
SetInodeAttributesOp
)
(
err
error
)
{
fs
.
mu
.
Lock
()
defer
fs
.
mu
.
Unlock
()
...
...
@@ -259,6 +264,7 @@ func (fs *memFS) SetInodeAttributes(
}
func
(
fs
*
memFS
)
MkDir
(
ctx
context
.
Context
,
op
*
fuseops
.
MkDirOp
)
(
err
error
)
{
fs
.
mu
.
Lock
()
defer
fs
.
mu
.
Unlock
()
...
...
@@ -301,6 +307,7 @@ func (fs *memFS) MkDir(
}
func
(
fs
*
memFS
)
CreateFile
(
ctx
context
.
Context
,
op
*
fuseops
.
CreateFileOp
)
(
err
error
)
{
fs
.
mu
.
Lock
()
defer
fs
.
mu
.
Unlock
()
...
...
@@ -350,6 +357,7 @@ func (fs *memFS) CreateFile(
}
func
(
fs
*
memFS
)
CreateSymlink
(
ctx
context
.
Context
,
op
*
fuseops
.
CreateSymlinkOp
)
(
err
error
)
{
fs
.
mu
.
Lock
()
defer
fs
.
mu
.
Unlock
()
...
...
@@ -400,6 +408,7 @@ func (fs *memFS) CreateSymlink(
}
func
(
fs
*
memFS
)
Rename
(
ctx
context
.
Context
,
op
*
fuseops
.
RenameOp
)
(
err
error
)
{
fs
.
mu
.
Lock
()
defer
fs
.
mu
.
Unlock
()
...
...
@@ -440,6 +449,7 @@ func (fs *memFS) Rename(
}
func
(
fs
*
memFS
)
RmDir
(
ctx
context
.
Context
,
op
*
fuseops
.
RmDirOp
)
(
err
error
)
{
fs
.
mu
.
Lock
()
defer
fs
.
mu
.
Unlock
()
...
...
@@ -473,6 +483,7 @@ func (fs *memFS) RmDir(
}
func
(
fs
*
memFS
)
Unlink
(
ctx
context
.
Context
,
op
*
fuseops
.
UnlinkOp
)
(
err
error
)
{
fs
.
mu
.
Lock
()
defer
fs
.
mu
.
Unlock
()
...
...
@@ -500,6 +511,7 @@ func (fs *memFS) Unlink(
}
func
(
fs
*
memFS
)
OpenDir
(
ctx
context
.
Context
,
op
*
fuseops
.
OpenDirOp
)
(
err
error
)
{
fs
.
mu
.
Lock
()
defer
fs
.
mu
.
Unlock
()
...
...
@@ -517,6 +529,7 @@ func (fs *memFS) OpenDir(
}
func
(
fs
*
memFS
)
ReadDir
(
ctx
context
.
Context
,
op
*
fuseops
.
ReadDirOp
)
(
err
error
)
{
fs
.
mu
.
Lock
()
defer
fs
.
mu
.
Unlock
()
...
...
@@ -531,6 +544,7 @@ func (fs *memFS) ReadDir(
}
func
(
fs
*
memFS
)
OpenFile
(
ctx
context
.
Context
,
op
*
fuseops
.
OpenFileOp
)
(
err
error
)
{
fs
.
mu
.
Lock
()
defer
fs
.
mu
.
Unlock
()
...
...
@@ -548,6 +562,7 @@ func (fs *memFS) OpenFile(
}
func
(
fs
*
memFS
)
ReadFile
(
ctx
context
.
Context
,
op
*
fuseops
.
ReadFileOp
)
(
err
error
)
{
fs
.
mu
.
Lock
()
defer
fs
.
mu
.
Unlock
()
...
...
@@ -569,6 +584,7 @@ func (fs *memFS) ReadFile(
}
func
(
fs
*
memFS
)
WriteFile
(
ctx
context
.
Context
,
op
*
fuseops
.
WriteFileOp
)
(
err
error
)
{
fs
.
mu
.
Lock
()
defer
fs
.
mu
.
Unlock
()
...
...
@@ -583,6 +599,7 @@ func (fs *memFS) WriteFile(
}
func
(
fs
*
memFS
)
ReadSymlink
(
ctx
context
.
Context
,
op
*
fuseops
.
ReadSymlinkOp
)
(
err
error
)
{
fs
.
mu
.
Lock
()
defer
fs
.
mu
.
Unlock
()
...
...
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