Exemple #1
0
func zipAttr(f *zip.File, a *fuse.Attr) {
	a.Size = f.UncompressedSize64
	a.Mode = f.Mode()
	a.Mtime = f.ModTime()
	a.Ctime = f.ModTime()
	a.Crtime = f.ModTime()
}
Exemple #2
0
func (self *File) Attr(ctx context.Context, a *fuse.Attr) error {
	a.Mode = 0755
	a.Size = self.item.Size
	t := time.Now()
	a.Crtime = t
	a.Ctime = t
	a.Mtime = t

	return nil
}
Exemple #3
0
func nodeAttr(ctx context.Context, n Node, attr *fuse.Attr) error {
	attr.Valid = attrValidTime
	attr.Nlink = 1
	attr.Atime = startTime
	attr.Mtime = startTime
	attr.Ctime = startTime
	attr.Crtime = startTime
	if err := n.Attr(ctx, attr); err != nil {
		return err
	}
	return nil
}