Deisgn Inmemory File System08 Feb 2020
- 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.
- iterate pointer to its end
- if there is no esxisting path, add it