Pergunta de entrevista da empresa Amazon

How to get all files in a file system which can have multiple directories?