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
971c6680
Commit
971c6680
authored
Feb 27, 2015
by
Aaron Jacobs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added an OpenFile method.
parent
08226b03
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
34 additions
and
0 deletions
+34
-0
file_system.go
file_system.go
+34
-0
No files found.
file_system.go
View file @
971c6680
...
...
@@ -76,6 +76,17 @@ type FileSystem interface {
ReleaseDirHandle
(
ctx
context
.
Context
,
req
*
ReleaseDirHandleRequest
)
(
*
ReleaseDirHandleResponse
,
error
)
///////////////////////////////////
// File handles
///////////////////////////////////
// Open a file inode. The kernel calls this method when setting up a struct
// file for a particular inode with type file, usually in response to an
// open(2) call from a user-space process.
OpenFile
(
ctx
context
.
Context
,
req
*
OpenFileRequest
)
(
*
OpenFileResponse
,
error
)
}
////////////////////////////////////////////////////////////////////////
...
...
@@ -381,3 +392,26 @@ type ReleaseDirHandleRequest struct {
type
ReleaseDirHandleResponse
struct
{
}
type
OpenFileRequest
struct
{
// The ID of the inode to be opened.
Inode
InodeID
// Mode and options flags.
Flags
bazilfuse
.
OpenFlags
}
type
OpenFileResponse
struct
{
// An opaque ID that will be echoed in follow-up calls for this file using
// the same struct file in the kernel. In practice this usually means
// follow-up calls using the file descriptor returned by open(2).
//
// The handle may be supplied to the following methods:
//
// * ReadFile
// * ReleaseFileHandle
//
// The file system must ensure this ID remains valid until a later call to
// ReleaseFileHandle.
Handle
HandleID
}
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