Пример #1
0
func (tag *Tag) Stat(fid *Fid) error {
	req := tag.reqAlloc()
	req.fid = fid
	err := go9p.PackTstat(req.Tc, fid.Fid)
	if err != nil {
		return err
	}

	return tag.clnt.Rpcnb(req)
}
Пример #2
0
// Returns the metadata for the file associated with the Fid, or an Error.
func (clnt *Clnt) Stat(fid *Fid) (*go9p.Dir, error) {
	tc := clnt.NewFcall()
	err := go9p.PackTstat(tc, fid.Fid)
	if err != nil {
		return nil, err
	}

	rc, err := clnt.Rpc(tc)
	if err != nil {
		return nil, err
	}

	return &rc.Dir, nil
}