Deisgn Inmemory File System
08 Feb 2020ls:
- initialize t, and iterate it to the last point. (by spliting “path” using “/”)
-
Stop at either end level dir or file name, if it is file name, just return the file name. Otherwise if it is a dir, get its sub-dirs and add them into output;
- sort the ouput list and return.
Mkdir:
- iterate pointer to its end
- if there is no esxisting path, add it