Design a simplified file browser that can represent a nested folder structure. Implement a class FileBrowser that supports the following operations:
add_folder(path: str): Add a folder at the specified path. The path uses '/' as a separator and must not contain duplicate folders.add_file(path: str): Add a file at the specified path. The path must include the folder structure leading to the file.list_contents(path: str) -> List[str]: Return a list of all files and folders at the specified path, sorted lexicographically.Example 1:
fb = FileBrowser()
fb.add_folder('/documents')
fb.add_folder('/documents/photos')
fb.add_file('/documents/photos/vacation.jpg')
print(fb.list_contents('/documents/photos')) # Output: ['vacation.jpg']
Example 2:
fb.add_folder('/music')
fb.add_file('/music/song.mp3')
print(fb.list_contents('/music')) # Output: ['song.mp3']