Added a mode to inode attributes.
parent
70479d63bd
commit
72e4ed930d
|
@ -4,6 +4,7 @@
|
|||
package fuse
|
||||
|
||||
import (
|
||||
"os"
|
||||
"time"
|
||||
|
||||
bazilfuse "bazil.org/fuse"
|
||||
|
@ -89,8 +90,8 @@ const RootInodeID InodeID = InodeID(bazilfuse.RootID)
|
|||
// Attributes for a file or directory inode. Corresponds to struct inode (cf.
|
||||
// http://goo.gl/tvYyQt).
|
||||
type InodeAttributes struct {
|
||||
// The size of the file in bytes.
|
||||
Size uint64
|
||||
Mode os.FileMode
|
||||
}
|
||||
|
||||
// A generation number for an inode. Irrelevant for file systems that won't be
|
||||
|
|
|
@ -4,6 +4,8 @@
|
|||
package samples
|
||||
|
||||
import (
|
||||
"os"
|
||||
|
||||
"github.com/jacobsa/fuse"
|
||||
"github.com/jacobsa/fuse/fuseutil"
|
||||
"github.com/jacobsa/gcsfuse/timeutil"
|
||||
|
@ -45,8 +47,10 @@ type inodeInfo struct {
|
|||
var gInodeInfo = map[fuse.InodeID]inodeInfo{
|
||||
// root
|
||||
rootInode: inodeInfo{
|
||||
attributes: fuse.InodeAttributes{},
|
||||
dir: true,
|
||||
attributes: fuse.InodeAttributes{
|
||||
Mode: 0700 | os.ModeDir,
|
||||
},
|
||||
dir: true,
|
||||
children: []fuseutil.Dirent{
|
||||
fuseutil.Dirent{
|
||||
Offset: 1,
|
||||
|
|
Loading…
Reference in New Issue