def stat(path, user=None):
host, port, path_ = split(path, user)<EOL>fs = hdfs_fs.hdfs(host, port, user)<EOL>retval = StatResult(fs.get_path_info(path_))<EOL>if not host:<EOL><INDENT>_update_stat(retval, path_)<EOL><DEDENT>fs.close()<EOL>return retval<EOL>
Performs the equivalent of :func:`os.stat` on ``path``, returning a
:class:`StatResult` object.