ssh_sftp:list_dir returns the remote listing at a given path. The listing is a list of names of type string(). Apart from listing what's in a remote directory, this function seems to have a very limited use.
It would be nice if it could return some more information about each item, e.g. whether its a file or a directory, its size, ctime, atime etc. There is a readdir function which can be used for this purpose but list_dir seems to be doing all of the accumulator loop stuff already. Another option is to call read_file_info on each item.
This sort of functionality would be handy if provided by the stdlib.
May be we can get another function list_dir_details or something similar that gives us more information about the listing? May be Name, Info tuples? I would think ssh_xfer_attr record would need to be exposed as well and put in an include directory may be.
I can work on a PR if it seems something like this would be useful.
Edit: Couple of format edits.