Summary
Gets all files and directories matching the specified pattern.
This is the entry point for scripts and Frosting, when it is not known
whether the matched paths are files or directories.
Syntax
[CakeMethodAlias]
[CakeAliasCategory("Paths")]
public static IEnumerable<IFileSystemInfo> GetFileSystemInfos(this ICakeContext context, GlobPattern pattern)
Examples
var entries = GetFileSystemInfos("./artifacts/*");
foreach (var entry in entries)
{
Information("{0}: {1}", entry is IDirectory ? "Directory" : "File", entry.Path);
}
Attributes
Parameters
Return Value
| Type |
Description |
| IEnumerable<IFileSystemInfo> |
The file system entries matching the specified pattern. |