Pregunta de entrevista de Bloomberg

Commands like what does 'ls' do? How would you implement it?