Exemplo n.º 1
0
func (f *NullFS) Stat(req *srv.Req) {
	fid := req.Fid.Aux.(*Fid)
	d := &ninep.Dir{
		Qid:  *fid.Qid,
		Type: uint16(fid.Type),
		Mode: uint32(fid.Type) | fid.Version,
		Name: fid.Name,
		Uid:  "root",
		Gid:  "root",
	}
	req.RespondRstat(d)
}
Exemplo n.º 2
0
func (*Ufs) Stat(req *srv.Req) {
	fid := req.Fid.Aux.(*Fid)
	if err := fid.stat(); err != nil {
		req.RespondError(err)
		return
	}

	st, err := dir2Dir(fid.path, fid.st, req.Conn.Dotu, req.Conn.Srv.Upool)
	if err != nil {
		req.RespondError(err)
		return
	}
	req.RespondRstat(st)
}