Added a getattr method.
parent
ed1cf943b0
commit
afe364822a
|
@ -26,6 +26,12 @@ type FileSystem interface {
|
||||||
ctx context.Context,
|
ctx context.Context,
|
||||||
req *LookUpInodeRequest) (*LookUpInodeResponse, error)
|
req *LookUpInodeRequest) (*LookUpInodeResponse, error)
|
||||||
|
|
||||||
|
// Refresh the attributes for an inode whose ID was previously returned by
|
||||||
|
// LookUpInode.
|
||||||
|
GetInodeAttributes(
|
||||||
|
ctx context.Context,
|
||||||
|
req *GetInodeAttributesRequest) (*GetInodeAttributesResponse, error)
|
||||||
|
|
||||||
// Forget an inode ID previously issued (e.g. by LookUpInode). The kernel
|
// Forget an inode ID previously issued (e.g. by LookUpInode). The kernel
|
||||||
// calls this when removing an inode from its internal caches.
|
// calls this when removing an inode from its internal caches.
|
||||||
ForgetInode(
|
ForgetInode(
|
||||||
|
@ -201,6 +207,18 @@ type LookUpInodeResponse struct {
|
||||||
EntryExpiration time.Time
|
EntryExpiration time.Time
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type GetInodeAttributesRequest struct {
|
||||||
|
// The inode of interest.
|
||||||
|
Inode InodeID
|
||||||
|
}
|
||||||
|
|
||||||
|
type GetInodeAttributesResponse struct {
|
||||||
|
// Attributes for the inode, and the time at which they should expire. See
|
||||||
|
// notes on LookUpInodeResponse.AttributesExpiration for more.
|
||||||
|
Attributes InodeAttributes
|
||||||
|
AttributesExpiration time.Time
|
||||||
|
}
|
||||||
|
|
||||||
type ForgetInodeRequest struct {
|
type ForgetInodeRequest struct {
|
||||||
// The inode to be forgotten. The kernel guarantees that the node ID will not
|
// The inode to be forgotten. The kernel guarantees that the node ID will not
|
||||||
// be used in further calls to the file system (unless it is reissued by the
|
// be used in further calls to the file system (unless it is reissued by the
|
||||||
|
|
|
@ -21,6 +21,13 @@ func (fs *NotImplementedFileSystem) LookUpInode(
|
||||||
return nil, fuse.ENOSYS
|
return nil, fuse.ENOSYS
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (fs *NotImplementedFileSystem) GetInodeAttributes(
|
||||||
|
ctx context.Context,
|
||||||
|
req *fuse.GetInodeAttributesRequest) (
|
||||||
|
*fuse.GetInodeAttributesResponse, error) {
|
||||||
|
return nil, fuse.ENOSYS
|
||||||
|
}
|
||||||
|
|
||||||
func (fs *NotImplementedFileSystem) ForgetInode(
|
func (fs *NotImplementedFileSystem) ForgetInode(
|
||||||
ctx context.Context,
|
ctx context.Context,
|
||||||
req *fuse.ForgetInodeRequest) (*fuse.ForgetInodeResponse, error) {
|
req *fuse.ForgetInodeRequest) (*fuse.ForgetInodeResponse, error) {
|
||||||
|
|
Loading…
Reference in New Issue