FileNode constructor

FileNode({
  1. required String name,
  2. required String path,
  3. required bool isDirectory,
  4. int size = 0,
  5. List<FileNode>? children,
})

Creates a new FileNode instance.

name The name of the file or directory. path The full path to the file or directory. isDirectory Whether this node represents a directory. size Size of the file in bytes (default: 0). children Child nodes if this is a directory (default: empty list).

Implementation

FileNode({
  required this.name,
  required this.path,
  required this.isDirectory,
  this.size = 0,
  List<FileNode>? children,
}) : children = children ?? [];