コード例 #1
0
ファイル: revelo.go プロジェクト: muthu-r/horcrux
func (d *DIR) Attr(ctx context.Context, attr *fuse.Attr) error {
	stat := d.Entry.Stat
	attr.Mode = stat.Mode
	attr.Size = uint64(stat.Size)
	attr.Uid = stat.Uid
	attr.Gid = stat.Gid
	return nil
}
コード例 #2
0
ファイル: revelo.go プロジェクト: muthu-r/horcrux
func (f *FILE) Attr(ctx context.Context, a *fuse.Attr) error {
	stat := f.Entry.Stat
	a.Mode = stat.Mode
	a.Size = uint64(stat.Size)
	a.Uid = stat.Uid
	a.Gid = stat.Gid

	return nil
}
コード例 #3
0
ファイル: options_test.go プロジェクト: muthu-r/horcrux
func (f unwritableFile) Attr(ctx context.Context, a *fuse.Attr) error {
	a.Mode = 0000
	return nil
}
コード例 #4
0
ファイル: testfs.go プロジェクト: muthu-r/horcrux
func (f *ChildMap) Attr(ctx context.Context, a *fuse.Attr) error {
	a.Mode = os.ModeDir | 0777
	return nil
}
コード例 #5
0
ファイル: testfs.go プロジェクト: muthu-r/horcrux
func (f File) Attr(ctx context.Context, a *fuse.Attr) error {
	a.Mode = 0666
	return nil
}
コード例 #6
0
ファイル: hello.go プロジェクト: muthu-r/horcrux
func (File) Attr(ctx context.Context, a *fuse.Attr) error {
	a.Inode = 2
	a.Mode = 0444
	a.Size = uint64(len(greeting))
	return nil
}
コード例 #7
0
ファイル: hello.go プロジェクト: muthu-r/horcrux
func (Dir) Attr(ctx context.Context, a *fuse.Attr) error {
	a.Inode = 1
	a.Mode = os.ModeDir | 0555
	return nil
}
コード例 #8
0
ファイル: tree.go プロジェクト: muthu-r/horcrux
func (t *tree) Attr(ctx context.Context, a *fuse.Attr) error {
	a.Mode = os.ModeDir | 0555
	return nil
}