$sftp->ls($remote [, $subref ]) Fetches a directory listing of $remote. If $subref is specified, for each entry in the directory, $subref will be called and given a reference to a hash with three keys: filename, the name of the entry in the directory listing; longname, an entry in a "long" listing like ls -l; and a, a Net::SFTP::Attributes object, which contains the file attributes of the entry (atime, mtime, permissions, etc.). If $subref is not specified, returns a list of directory entries, each of which is a reference to a hash as described in the previous paragraph.