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
42cefe94
Commit
42cefe94
authored
Mar 30, 2015
by
Aaron Jacobs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revised a plan.
parent
8e8c391a
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
3 deletions
+26
-3
samples/forgetfs/forget_fs.go
samples/forgetfs/forget_fs.go
+26
-3
No files found.
samples/forgetfs/forget_fs.go
View file @
42cefe94
...
...
@@ -14,7 +14,10 @@
package
forgetfs
import
"github.com/jacobsa/fuse"
import
(
"github.com/jacobsa/fuse"
"github.com/jacobsa/fuse/fuseutil"
)
// Create a file system whose sole contents are a file named "foo" and a
// directory named "bar".
...
...
@@ -30,15 +33,27 @@ import "github.com/jacobsa/fuse"
// there are no inodes with non-zero reference counts remaining, after
// unmounting.
func
NewFileSystem
()
(
fs
*
ForgetFS
)
{
fs
=
&
ForgetFS
{}
impl
:=
&
fsImpl
{}
fs
=
&
ForgetFS
{
impl
:
impl
,
server
:
fuseutil
.
NewFileSystemServer
(
impl
),
}
return
}
////////////////////////////////////////////////////////////////////////
// ForgetFS
////////////////////////////////////////////////////////////////////////
type
ForgetFS
struct
{
impl
*
fsImpl
server
fuse
.
Server
}
func
(
fs
*
ForgetFS
)
ServeOps
(
c
*
fuse
.
Connection
)
{
panic
(
"TODO: Export dispatch function from fuseutil and use it here."
)
fs
.
server
.
ServeOps
(
c
)
}
// Panic if there are any inodes that have a non-zero reference count. For use
...
...
@@ -46,3 +61,11 @@ func (fs *ForgetFS) ServeOps(c *fuse.Connection) {
func
(
fs
*
ForgetFS
)
Check
()
{
panic
(
"TODO"
)
}
////////////////////////////////////////////////////////////////////////
// Actual implementation
////////////////////////////////////////////////////////////////////////
type
fsImpl
struct
{
fuseutil
.
NotImplementedFileSystem
}
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