IFileSystem.

GetFileSystemInfo(Path) Method

Summary

Gets a IFileSystemInfo for the specified path.
Namespace
Cake.Core.IO
Containing Type
IFileSystem

Syntax

IFileSystemInfo GetFileSystemInfo(Path path)

Examples

var info = context.FileSystem.GetFileSystemInfo(context.Environment.WorkingDirectory);
Information("{0} is a directory: {1}", info.Path, info is IDirectory);

Parameters

Name Type Description
path Path 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.