Summary
Gets all files and directories matching the specified pattern.
Scripts and Frosting should use the GetFileSystemInfos(pattern) alias in Cake.Common instead,
which supplies the file system from the context.
Syntax
public static IEnumerable<IFileSystemInfo> GetFileSystemInfos(this IGlobber globber, IFileSystem fileSystem, GlobPattern pattern)
Examples
var entries = context.Globber.GetFileSystemInfos(context.FileSystem, "./artifacts/*");
foreach (var entry in entries)
{
Information("{0}: {1}", entry is IDirectory ? "Directory" : "File", entry.Path);
}
Parameters
Return Value
| Type |
Description |
| IEnumerable<IFileSystemInfo> |
The file system entries matching the specified pattern. |