RelativePattern

A relative pattern is a helper to construct glob patterns that are matched relatively to a base file path. The base path can either be an absolute file path as string or uri or a workspace folder, which is the preferred way of creating the relative pattern.

Online Documentation

Constructors

Link copied to clipboard
constructor(base: JsAny, pattern: String)

Creates a new relative pattern object with a base file path and pattern to match. This pattern will be matched on file paths relative to the base.

Properties

Link copied to clipboard

A base file path to which this pattern will be matched against relatively. The file path must be absolute, should not have any trailing path separators and not include any relative segments (. or ..).

Link copied to clipboard

A file glob pattern like *.{ts,js} that will be matched on file paths relative to the base path.