Salesforce interview question

Design and code a command line processor. the directory structure should be in cache and commands like mkdir, CD, ls, ls -R, touch, etc should work. The program should exit when input is "quit". Write test cases.