示例#1
0
    def stat(self, path):
        path = self._splitpath(path)

        try:
            with self._walk(path) as fid:
                resp = self._dorpc(fcall.Tstat(fid=fid))
                st = resp.stat
                self._clunk(fid)
            return st
        except RPCError:
            return None
示例#2
0
 def stat(self):
     resp = self._dorpc(fcall.Tstat())
     return resp.stat
示例#3
0
    def stat(self, callback):
        def next(resp, exc, tb):
            callback(resp.stat, exc, tb)

        resp = self._dorpc(fcall.Tstat(), next, callback)
示例#4
0
        def next(fid, exc, tb):
            def next(resp, exc, tb):
                callback(resp.stat, exc, tb)

            self._dorpc(fcall.Tstat(fid=fid), next, callback)