Directory Tree In this assignment, students are required to implement an operati
ID: 3532073 • Letter: D
Question
Directory Tree
In this assignment, students are required to implement an operating system command
that displays the tree structure of a folder or directory. The program asks the
user to enter a folder name. Next, the program traverses the tree hierarchy of this
folder in a preorder traversal to retrieve the children folders or files in the specified
folder. As the hierarchy is being traversed, the names of the subfolders or files are
being displayed in an indented fashion where the amount of indentation reflects
the hierarchy level of the displayed subfolders or files. This command should produce
an output similar to the tree command in the DOS operating system. The
figure below shows a display of a partial output of the tree command.
Explanation / Answer
Syntax
TREE Drive: Path /f /a
Examples
tree
List a tree listing of the current drive. Below is a basic example of what a directory may look like.
C:.
????Common
????Director
????Flash
????Shockwave 8
? ????DswMedia
? ????Prefs
? ????Xtras
????update
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.