Click or drag to resize

DirectoryInfoDelete Method (Boolean, Boolean, Boolean)

[AlphaFS] Deletes this instance of a DirectoryInfo, specifying whether to delete files and subdirectories.

Namespace:  Alphaleonis.Win32.Filesystem
Assembly:  AlphaFS (in AlphaFS.dll) Version: 2.2
Syntax
public void Delete(
	bool recursive,
	bool ignoreReadOnly,
	bool continueOnNotFound
)

Parameters

recursive
Type: SystemBoolean
to delete this directory, its subdirectories, and all files; otherwise, .
ignoreReadOnly
Type: SystemBoolean
ignores read only attribute of files and directories.
continueOnNotFound
Type: SystemBoolean
When does not throw an DirectoryNotFoundException when the directory does not exist.
Exceptions
Remarks

If the DirectoryInfo has no files and no subdirectories, this method deletes the DirectoryInfo even if recursive is .

Attempting to delete a DirectoryInfo that is not empty when recursive is false throws an IOException.

See Also