Exemple #1
0
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)
}
Exemple #2
0
func (f *MutableDataFile) getAttr(out *fuse.Attr) {
	*out = f.Attr
	out.Size = uint64(len(f.data))
}
Exemple #3
0
func (f *dataFile) GetAttr(out *fuse.Attr) fuse.Status {
	out.Mode = fuse.S_IFREG | 0644
	out.Size = uint64(len(f.data))
	return fuse.OK
}
Exemple #4
0
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
}
Exemple #5
0
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
}
Exemple #6
0
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)
}