当前位置: 首页>>代码示例>>Golang>>正文


Golang Inode.FullMode方法代码示例

本文整理汇总了Golang中github.com/jbooth/maggiefs/maggiefs.Inode.FullMode方法的典型用法代码示例。如果您正苦于以下问题:Golang Inode.FullMode方法的具体用法?Golang Inode.FullMode怎么用?Golang Inode.FullMode使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在github.com/jbooth/maggiefs/maggiefs.Inode的用法示例。


在下文中一共展示了Inode.FullMode方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Golang代码示例。

示例1: fillEntryOut

func fillEntryOut(out *raw.EntryOut, i *maggiefs.Inode) {
	// fill out
	out.NodeId = i.Inodeid
	out.Generation = i.Generation
	out.EntryValid = uint64(0)
	out.AttrValid = uint64(0)
	out.EntryValidNsec = uint32(100)
	out.AttrValidNsec = uint32(100)
	//Inode
	out.Ino = i.Inodeid
	out.Size = i.Length
	out.Blocks = numBlocks(i.Length, maggiefs.PAGESIZE)
	out.Atime = uint64(0)       // always 0 for atime
	out.Mtime = uint64(i.Mtime) // Mtime is user modifiable and is the last time data changed
	out.Ctime = uint64(i.Ctime) // Ctime is tracked by the FS and changes when attrs or data change
	out.Atimensec = uint32(0)
	out.Mtimensec = uint32(0)
	out.Ctimensec = uint32(0)
	out.Mode = i.FullMode()
	out.Nlink = i.Nlink
	out.Uid = i.Uid
	out.Gid = i.Gid
	out.Rdev = uint32(0) // regular file, not block dvice
	out.Blksize = maggiefs.PAGESIZE
}
开发者ID:jonpugh,项目名称:maggiefs,代码行数:25,代码来源:fuseconnector.go

示例2: fillAttrOut

func fillAttrOut(out *raw.AttrOut, i *maggiefs.Inode) {
	// raw.Attr
	out.Ino = i.Inodeid
	out.Size = i.Length
	out.Blocks = numBlocks(i.Length, maggiefs.PAGESIZE)
	out.Atime = uint64(0)       // always 0 for atime
	out.Mtime = uint64(i.Mtime) // Mtime is user modifiable and is the last time data changed
	out.Ctime = uint64(i.Ctime) // Ctime is tracked by the FS and changes when attrs or data change
	out.Atimensec = uint32(0)
	out.Mtimensec = uint32(0)
	out.Ctimensec = uint32(0)
	out.Mode = i.FullMode()
	out.Nlink = i.Nlink
	out.Uid = i.Uid
	out.Gid = i.Gid
	out.Rdev = uint32(0) // regular file, not block dvice
	out.Blksize = maggiefs.PAGESIZE
	// raw.AttrOut
	out.AttrValid = uint64(0)
	out.AttrValidNsec = uint32(100)
	fmt.Printf("Filled attrOut %v with inode %v\n", out, i)
}
开发者ID:jonpugh,项目名称:maggiefs,代码行数:22,代码来源:fuseconnector.go


注:本文中的github.com/jbooth/maggiefs/maggiefs.Inode.FullMode方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。