glob
    Preparing search index...

    Class GlobWalker<O>

    Walks the file system for the matches of a set of patterns.

    Use each object for one call to one of GlobWalker.walk, GlobWalker.walkSync, GlobWalker.iterate, or GlobWalker.iterateSync.

    Type Parameters

    Index
    includeChildMatches: boolean
    matches: Result<O>[] = []
    maxDepth: number
    opts: O
    path: Path
    patterns: Pattern[]
    seen: Set<Path> = ...

    The paths that are in the results, if the patterns can match the same path more than one time. It stays empty if they can not.

    signal?: AbortSignal
    • Walk the patterns, and give each match when it is found.

      The walk starts on the first call to next(). It reads directories ahead of the consumer, and waits when it holds ITERATE_BUFFER (from path-scurry) matches that the consumer has not taken yet.

      After the signal aborts, next() rejects with the reason.

      Returns AsyncIterableIterator<Result<O>>

    • Synchronous GlobWalker.iterate

      The walk starts on the first call to next(), and reads the file system only when it has no more matches to give.

      After the signal aborts, next() throws the reason.

      Returns IterableIterator<Result<O>>

    • Parameters

      • e: Path
      • absolute: boolean
      • ifDir: boolean

      Returns Promise<void>

    • Parameters

      • inPath: Path
      • ifDir: boolean

      Returns Promise<Path | undefined>

    • Parameters

      • e: Path | undefined
      • ifDir: boolean

      Returns Path | undefined

    • Parameters

      • e: Path
      • absolute: boolean

      Returns void

    • Parameters

      • e: Path
      • absolute: boolean
      • ifDir: boolean

      Returns void