This content is part of a third party extension that is not supported by the Cake project.
For more information about this extension see Cake.Incubator.
Summary
Returns files in the same directory that have the same file name but different extensions
- Assembly
- Cake
.Incubator .dll - Namespace
- Cake
.Incubator .GlobbingExtensions - Containing Type
- GlobbingExtensions
Syntax
public static FilePathCollection GetMatchingFiles(this ICakeContext context, IEnumerable<FilePath> files)
Examples
Locates files with the same name in the same directory, but different extensions.
The .pdb to your .dll as it were. If found, returns the original file as well.
// /output/file.dll
// /output/file.xml
// /output/file.pdb
// /output/another.dll
FilePathCollection matchingFiles = GetMatchingFiles(new FilePath("/output/file.dll"));
matchingFiles.First(); // /output/file.xml
matchingFiles.Skip(1).First(); // /output/file.pdb
matchingFiles.Last(); // /output/file.dll
Attributes
Type | Description |
---|---|
Cake |
|
Cake |
Parameters
Name | Type | Description |
---|---|---|
context | ICakeContext | the cake context |
files | IEnumerable |
the files to return matches for |
Return Value
Type | Description |
---|---|
FilePathCollection | a list of matching files |