Moj-eRačun interview question

What is API? Write function for iteration through directory and list all files, etc