本文整理汇总了Golang中github.com/y-okubo/go-fuse/fuse.Attr.Size方法的典型用法代码示例。如果您正苦于以下问题:Golang Attr.Size方法的具体用法?Golang Attr.Size怎么用?Golang Attr.Size使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类github.com/y-okubo/go-fuse/fuse.Attr
的用法示例。
在下文中一共展示了Attr.Size方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Golang代码示例。
示例1: HeaderToFileInfo
func HeaderToFileInfo(out *fuse.Attr, h *tar.Header) {
out.Mode = uint32(h.Mode)
out.Size = uint64(h.Size)
out.Uid = uint32(h.Uid)
out.Gid = uint32(h.Gid)
out.SetTimes(&h.AccessTime, &h.ModTime, &h.ChangeTime)
}
示例2: getAttr
func (f *MutableDataFile) getAttr(out *fuse.Attr) {
*out = f.Attr
out.Size = uint64(len(f.data))
}
示例3: GetAttr
func (f *dataFile) GetAttr(out *fuse.Attr) fuse.Status {
out.Mode = fuse.S_IFREG | 0644
out.Size = uint64(len(f.data))
return fuse.OK
}
示例4: GetAttr
func (f *dataFile) GetAttr(out *fuse.Attr) fuse.Status {
log.Print("dataFile.GetAttr()", " ", out)
out.Mode = fuse.S_IFREG | 0775
out.Size = uint64(len(f.data))
return fuse.OK
}
示例5: Lookup
func (n *nodeReadNode) Lookup(out *fuse.Attr, name string, context *fuse.Context) (*Inode, fuse.Status) {
out.Mode = fuse.S_IFREG | 0644
out.Size = uint64(len(name))
ch := n.Inode().NewChild(name, false, newNodeReadNode([]byte(name)))
return ch, fuse.OK
}
示例6: Stat
func (f *ZipFile) Stat(out *fuse.Attr) {
// TODO - do something intelligent with timestamps.
out.Mode = fuse.S_IFREG | 0444
out.Size = uint64(f.File.UncompressedSize)
}