constructor({
    rootDir,
    files,
    processFile,
  }: {
    rootDir: Path,
    files?: FileData,
    processFile: ProcessFileFunction,
  }) {
    this.#rootDir = rootDir;
    this.#pathUtils = new RootPathUtils(rootDir);
    this.#processFile = processFile;
    if (files != null) {
      this.bulkAddOrModify(files);
    }
  }
OVERVIEW:

TreeFS is Metro's in-memory representation of the file system. It is
structured as a tree of non-empty maps and leaves (tuples), with the root
node representing the given `rootDir`, typically Metro's _project root_
(not a filesystem root). Map keys are path segments, and branches outside
the project root are accessed via `'..'`.

EXAMPLE:

For a root dir '/data/project', the file '/data/other/app/index.js' would
have metadata at #rootNode.get('..').get('other').get('app').get('index.js')

SERIALISATION:

#rootNode is designed to be directly serialisable and directly portable (for
a given project) between different root directories and operating systems.

SYMLINKS:

Symlinks are represented as nodes whose metadata contains their literal
target. Literal targets are resolved to normal paths at runtime, and cached.
If a symlink is encountered during traversal, we restart traversal at the
root node targeting join(normal symlink target, remaining path suffix).

NODE TYPES:

- A directory (including a parent directory at '..') is represented by a
  `Map` of basenames to any other node type.
- A file is represented by an `Array`  (tuple) of metadata, of which:
  - A regular file has node[H.SYMLINK] === 0
  - A symlink has node[H.SYMLINK] === 1 or
    typeof node[H.SYMLINK] === 'string', where a string is the literal
    content of the symlink (i.e. from readlink), if known.

TERMINOLOGY:

- mixedPath
  A root-relative or absolute path
- relativePath
  A root-relative path
- normalPath
  A root-relative, normalised path (no extraneous '.' or '..'), may have a
  single trailing slash
- canonicalPath
  A root-relative, normalised, real path (no symlinks in dirname), never has
  a trailing slash