Index

Functions

dir

info

join

  • join(base: string, name: string): string
  • Parameters

    • base: string
    • name: string

    Returns string

walk

  • walk is a generator function that yields the files and directories under a given path, in a preorder traversal. "Preorder" means that the traversal is depth-first, and a directory is yielded immediately before the traversal examines its contents.

    Parameters

    • path: string

      the starting point for the traversal, which should be a directory.

    • Default value opts: WalkOpts = {}

      pre- and post-hooks for the walk. The pre-hook is called for each directory after it is yielded; if it returns a falsey value, the directory is not traversed. The post-hook is called after a directory's contents have all been traversed. The starting point does not get treated as part of the traversal, i.e., it starts with the contents of the directory at path.

    Returns IterableIterator<FileInfo>