<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def ls(path):
 """List files on HDFS. :param path: A string (potentially with wildcards). :rtype: A list of strings representing HDFS paths. :raises: IOError: An error occurred listing the directory (e.g., not available). """

    rcode, stdout, stderr = _checked_hadoop_fs_command('hadoop fs -ls %s' % path)
    found_line = lambda x: re.search('Found [0-9]+ items$', x)
    out = [x.split(' ')[-1] for x in stdout.split('\n')
           if x and not found_line(x)]
    return out