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