This content is part of a third party extension that is not supported by the Cake project.
For more information about this extension see Cake.Incubator.
Summary
Checks if the path has a specific filename and extension
- Assembly
- Cake
.Incubator .dll - Namespace
- Cake
.Incubator .FilePathExtensions - Containing Type
- FilePathExtensions
Syntax
public static bool HasFileName(this FilePath path, string fileName)
Examples
Check by the filename (includes extension)
new FilePath("/folder/testing.cs").HasFileName("testing.cs"); // true
Parameters
Name | Type | Description |
---|---|---|
path | FilePath | the path to check |
fileName | string | the file name and extension |
Return Value
Type | Description |
---|---|
bool | true if filename and extension matches |