Implement an in-memory file system supporting basic directory and file operations.
You must support the following methods (names are illustrative; any equivalent interface is fine):
ls(path)
path
is a file path, return a list containing
only the file name
.
path
is a directory path, return the names of
files and subdirectories directly under it
, sorted lexicographically.
mkdir(path)
addContentToFile(filePath, content)
content
to the existing file content.
readContentFromFile(filePath)
/
as the separator.
/
.