Skip to main content

Module GlobPattern

Module GlobPattern 

Source
Expand description

Glob pattern extraction helpers for WorkspaceProvider::FindFiles calls.

VS Code passes glob patterns in several shapes depending on the caller:

  • Bare string: "**/*.rs"
  • RelativePattern object: { base, pattern } or { baseUri, pattern }
  • Legacy serialised form: { value: "**/*.rs" }

These helpers normalise all shapes to a String and extract the optional base directory for bounded walks.

Functions§

ExtractGlobPattern 🔒
Extract a glob string from any shape the caller can supply:
ExtractRelativeBase 🔒
Extract a base directory from a RelativePattern-shaped value. VS Code’s RelativePattern carries { base, pattern } or { baseUri, pattern }. When present, the file walk is restricted to base. Returns None for plain glob strings.