Pattern

open external class Pattern(source)

Constructors

Link copied to clipboard
constructor(pattern: String)
constructor(pattern: String, isImplicitPattern: Boolean, segments: Void, homedir: String)
constructor(negate: Boolean, isImplicitPattern: Boolean, segments: ReadonlyArray<String>, homedir: String = definedExternally)

Types

Link copied to clipboard
external object Companion

Properties

Link copied to clipboard
external val negate: Boolean

Indicates whether matches should be excluded from the result set

Link copied to clipboard
external val searchPath: String

The directory to search. The literal path prior to the first glob segment.

Link copied to clipboard

The path/pattern segments. Note, only the first segment (the root directory) may contain a directory separator character. Use the trailingSeparator field to determine whether the pattern ended with a trailing slash.

Link copied to clipboard

Indicates the pattern should only match directories, not regular files.

Functions

Link copied to clipboard
external fun match(itemPath: String): MatchKind

Matches the pattern against the specified path

Link copied to clipboard
external fun partialMatch(itemPath: String): Boolean

Indicates whether the pattern may match descendants of the specified path