Summary
Gets a
IFileSystemInfo for the specified path, when it is not known
whether the path refers to a file or a directory.
- Namespace
- Cake
.Core .IO - Containing Type
- IFileSystem
Syntax
IFileSystemInfo GetFileSystemInfo(string path)
Examples
var info = context.FileSystem.GetFileSystemInfo("./artifacts");
Information("{0} exists: {1}, is a directory: {2}", info.Path, info.Exists, info is IDirectory);
Parameters
| Name | Type | Description |
|---|---|---|
| path | string | The path. |
Return Value
| Type | Description |
|---|---|
| IFileSystemInfo |
A IDirectory when the path exists as a directory; otherwise an IFile,
including when the path does not exist.
|
