printTree static method

Future<void> printTree({
  1. String? path,
  2. ConsoleColor? separatorColor,
  3. ConsoleColor? folderColor,
  4. ConsoleColor? fileColor,
  5. bool? withHiddenDirectories,
  6. bool? withHiddenFiles,
})

Prints a list of all the directories & files in the give directory path.

Implementation

static Future<void> printTree({
  String? path,
  ConsoleColor? separatorColor,
  ConsoleColor? folderColor,
  ConsoleColor? fileColor,
  //
  bool? withHiddenDirectories,
  bool? withHiddenFiles,
}) async =>
    await printDirectoryTree(
      path?.replaceSeparator() ?? IOHelper.directory.getCurrent(),
      separatorColor: separatorColor?.textCode ?? ConsoleColor.white.textCode,
      fileColor: fileColor?.textCode ?? ConsoleColor.blue.textCode,
      folderColor: folderColor?.textCode ?? ConsoleColor.magenta.textCode,
      //
      withHiddenDirectories: withHiddenDirectories ?? false,
      withHiddenFiles: withHiddenFiles ?? true,
    );