Partilhar via


MSBuildGlob Class

Definition

Represents a parsed MSBuild glob. An MSBuild glob is composed of three parts:

  • fixed directory part: "a/b/" in "a/b//test//*.cs"
  • wildcard directory part: "/test//" in "a/b//test//*.cs"
  • file name part: ".cs" in "a/b//test//.cs"
public ref class MSBuildGlob : Microsoft::Build::Globbing::IMSBuildGlob
public class MSBuildGlob : Microsoft.Build.Globbing.IMSBuildGlob
type MSBuildGlob = class
    interface IMSBuildGlob
Public Class MSBuildGlob
Implements IMSBuildGlob
Inheritance
MSBuildGlob
Implements

Properties

FilenamePart

The file name part

FixedDirectoryPart

The fixed directory part.

IsLegal

Whether the glob was parsed sucsesfully from a string. Illegal glob strings contain:

  • invalid path characters (other than the wildcard characters themselves)
  • "..."
  • ":" In addition, the wildcard directory part:
  • cannot contain ".."
  • if ** is present it must appear alone between slashes
WildcardDirectoryPart

The wildcard directory part

Methods

IsMatch(String)

Matches the given stringToMatch against the glob.

MatchInfo(String)

Similar to IsMatch(String) but also provides the match groups for the glob parts

Parse(String, String)

Parse the given fileSpec into a MSBuildGlob using a given globRoot.

Parse(String)

See Parse(String, String). The glob root, if the glob is not fully qualified, will be the current working directory.

Extension Methods

GetParsedGlobs(IMSBuildGlob)

Retrieve all the MSBuildGlob objects from the given glob composite.

Applies to