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