Summary
Throws an
System.IO.FileNotFoundException
if filePath filepath not exists.
- Namespace
- oehen
.arguard .Filesystem - Containing Type
- Argument
File Path Guard
Syntax
public static string ThrowIfFileNotExists(this string filePath, string nameOfArgument)
Examples
Throws when the file path in `argument` not exists.
var localVar = argument.ThrowIfFileNotExists(nameof(argument));
Parameters
Name | Type | Description |
---|---|---|
filePath | string | Argument value. |
nameOfArgument | string | Name of the argument. |
Return Value
Type | Description |
---|---|
string |