def stat(self, path):
path = self._adjust_cwd(path)<EOL>self._log(DEBUG, "<STR_LIT>".format(path))<EOL>t, msg = self._request(CMD_STAT, path)<EOL>if t != CMD_ATTRS:<EOL><INDENT>raise SFTPError("<STR_LIT>")<EOL><DEDENT>return SFTPAttributes._from_msg(msg)<EOL>
Retrieve information about a file on the remote system.  The return
value is an object whose attributes correspond to the attributes of
Python's ``stat`` structure as returned by ``os.stat``, except that it
contains fewer fields.  An SFTP server may return as much or as little
info as it wants, so the results may vary from server to server.

Unlike a Python `python:stat` object, the result may not be accessed as
a tuple.  This is mostly due to the author's slack factor.

The fields supported are: ``st_mode``, ``st_size``, ``st_uid``,
``st_gid``, ``st_atime``, and ``st_mtime``.

:param str path: the filename to stat
:return:
    an `.SFTPAttributes` object containing attributes about the given
    file