1. Create the method ‘public String getPath()’. This method will return a String that
shows the path from the root to current directory (e.g., /Outdoors/Trips/Summer).
2. Modify the existing method ‘public boolean moveDown(String directory)’ so that in-
stead of reading in a single directory and moving into that directory, it can read in a
path (e.g., Outdoors/Trips/Summer) and navigate to the final directory in the path,
if it exists. If the path is not valid, it should still print out an error message.
3. Create the method ‘public boolean remove(String directory)’. This method will remove
the selected directory, and all of its subdirectories, from the file system. If the directory
does not exist, the method should return false. If it does, remove it and return true.
4. Modify the ‘executeCommand’ method in the FileSystemManager class to incorporate
these new methods. Make it so the command ‘pwd’ calls the getPath method, and
’rm’ calls the remove method. No modification should be necessary for the modified
moveDown method. Make sure error messages are printed out for ‘rm’ is the designated
file does not exist.
———————————————————————————————————————————
•moveDown
•remove
•New commands in FileSystemManager