Summary
Gets all file system entries in the directory.
- Namespace
- Cake
.Core .IO - Containing Type
- IDirectory
Syntax
IEnumerable<IFileSystemInfo> GetFileSystemInfos(string filter, SearchScope scope)
Examples
var dir = context.FileSystem.GetDirectory("./artifacts");
foreach (var entry in dir.GetFileSystemInfos("*", SearchScope.Current))
{
Information("{0}: {1}", entry is IDirectory ? "Directory" : "File", entry.Path);
}
Parameters
| Name | Type | Description |
|---|---|---|
| filter | string | The filter. |
| scope | SearchScope | The search scope. |
Return Value
| Type | Description |
|---|---|
| IEnumerable |
The file system entries. |
