FileSystemExtensions.

Exist(IFileSystem, FilePath) Method

Summary

Determines if a specified FilePath exist.
Namespace
Cake.Core.IO
Containing Type
FileSystemExtensions

Syntax

public static bool Exist(this IFileSystem fileSystem, FilePath path)

Examples

if (context.FileSystem.Exist("./publish.enabled"))
{
    Information("Publish is enabled");
}

Parameters

Name Type Description
fileSystem IFileSystem The file system.
path FilePath The path.

Return Value

Type Description
bool Whether or not the specified file exist.