Declared a MkDir method.
parent
902c5800e1
commit
e612c866cb
|
@ -52,6 +52,16 @@ type FileSystem interface {
|
|||
ctx context.Context,
|
||||
req *ForgetInodeRequest) (*ForgetInodeResponse, error)
|
||||
|
||||
///////////////////////////////////
|
||||
// Inode creation
|
||||
///////////////////////////////////
|
||||
|
||||
// Create a directory inode as a child of an existing directory inode. The
|
||||
// kernel sends this in response to a mkdir(2) call.
|
||||
MkDir(
|
||||
ctx context.Context,
|
||||
req *MkDirRequest) (*MkDirResponse, error)
|
||||
|
||||
///////////////////////////////////
|
||||
// Directory handles
|
||||
///////////////////////////////////
|
||||
|
@ -306,6 +316,19 @@ type ForgetInodeRequest struct {
|
|||
type ForgetInodeResponse struct {
|
||||
}
|
||||
|
||||
type MkDirRequest struct {
|
||||
// The ID of parent directory inode within which to create the child.
|
||||
Parent InodeID
|
||||
|
||||
// The name of the child to create, and the mode with which to create it.
|
||||
Name string
|
||||
Mode os.FileMode
|
||||
}
|
||||
|
||||
type MkDirResponse struct {
|
||||
// TODO(jacobsa): Create a structure and share it with LookUpInodeResponse.
|
||||
}
|
||||
|
||||
type OpenDirRequest struct {
|
||||
// The ID of the inode to be opened.
|
||||
Inode InodeID
|
||||
|
|
|
@ -40,6 +40,12 @@ func (fs *NotImplementedFileSystem) ForgetInode(
|
|||
return nil, fuse.ENOSYS
|
||||
}
|
||||
|
||||
func (fs *NotImplementedFileSystem) MkDir(
|
||||
ctx context.Context,
|
||||
req *fuse.MkDirRequest) (*fuse.MkDirResponse, error) {
|
||||
return nil, fuse.ENOSYS
|
||||
}
|
||||
|
||||
func (fs *NotImplementedFileSystem) OpenDir(
|
||||
ctx context.Context,
|
||||
req *fuse.OpenDirRequest) (*fuse.OpenDirResponse, error) {
|
||||
|
|
Loading…
Reference in New Issue