Add api to list file

TODO: tests