Bloomberg interview question

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