コード例 #1
0
ファイル: serve.go プロジェクト: musha68k/go-ipfs
func (sn *serveNode) attr(ctx context.Context, attr *fuse.Attr) error {
	err := nodeAttr(ctx, sn.node, attr)
	if attr.Inode == 0 {
		attr.Inode = sn.inode
	}
	return err
}
コード例 #2
0
ファイル: bench_test.go プロジェクト: VictorBjelkholm/go-ipfs
func (benchFile) Attr(ctx context.Context, a *fuse.Attr) error {
	a.Inode = 2
	a.Mode = 0644
	a.Size = 9999999999999999
	return nil
}
コード例 #3
0
ファイル: bench_test.go プロジェクト: VictorBjelkholm/go-ipfs
func (benchDir) Attr(ctx context.Context, a *fuse.Attr) error {
	a.Inode = 1
	a.Mode = os.ModeDir | 0555
	return nil
}
コード例 #4
0
ファイル: hello.go プロジェクト: VictorBjelkholm/go-ipfs
func (File) Attr(ctx context.Context, a *fuse.Attr) error {
	a.Inode = 2
	a.Mode = 0444
	a.Size = uint64(len(greeting))
	return nil
}
コード例 #5
0
ファイル: serve_test.go プロジェクト: qnib/go-ipfs
func (f testStatFS) Attr(ctx context.Context, a *fuse.Attr) error {
	a.Inode = 1
	a.Mode = os.ModeDir | 0777
	return nil
}