IOHelperDoesDirectoryExist Method

Checks whether a directory exists.

Definition

Namespace: Configuration.Helper
Assembly: Configuration.Helper (in Configuration.Helper.dll) Version: 2.0.5
C#
public static bool DoesDirectoryExist(
	string directoryName,
	bool throwNotFound = false
)

Parameters

directoryName  String
Name of the file to check.
throwNotFound  Boolean  (Optional)
Throw an exception if the directory does not exist.

Return Value

Boolean
if the file exists, otherwise is returned.

Exceptions

DirectoryNotFoundExceptionThrown if the directory is not found and throwNotFound is True.

See Also