Design In-Memory File System
Understand how to design and implement an in-memory file system in C++. This lesson guides you through simulating directory and file operations like listing contents, creating directories, adding to files, and reading file content, reinforcing key coding interview patterns.
We'll cover the following...
We'll cover the following...
Statement
Design an in-memory file system. The skeleton for the class FileSystem is provided to you. Simulate the following functions:
-
ls(String path): If path is a file path, return a list that only contains the file’s name. If it’s a directory path, return the list of files and directory names in this directory. Your function should return the output ...