FilePathExtensions.

HasFileName(FilePath, string) Method

Summary

Checks if the path has a specific filename and extension

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