def kind(path, user=None):
hostname, port, path = split(path, user=user)<EOL>fs = hdfs_fs.hdfs(hostname, port)<EOL>try:<EOL><INDENT>return fs.get_path_info(path)['<STR_LIT>']<EOL><DEDENT>except IOError:<EOL><INDENT>return None<EOL><DEDENT>finally:<EOL><INDENT>fs.close()<EOL><DEDENT>
Get the kind of item ("file" or "directory") that the path references.

Return :obj:`None` if ``path`` doesn't exist.