IOHelperDoesFileExist Method

Checks whether a file exists.

Definition

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

Parameters

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

Return Value

Boolean
if the file exists, otherwise is returned.

Exceptions

FileNotFoundExceptionThrown if the file is not found and throwNotFound is True.

See Also