You are given a root directory of a filesystem represented as a tree. Each node is either a directory (can have children) or a file (no children). Print the directory structure starting from the root, using indentation to show depth.
⟶
). Repeating the marker indicates deeper nesting.
Example formatting (depth shown by repeated markers):
dir
⟶ subdir1
⟶ ⟶ file1.ext
⟶ ⟶ subsubdir1
⟶ subdir2
⟶ ⟶ subsubdir2
⟶ ⟶ ⟶ file2.ext
Implement a function that, given the root node, prints (or returns as a list of strings) the directory tree in the required format.