Click or drag to resize

DirectoryInfoDelete Method (Boolean)

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

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

Parameters

recursive
Type: SystemBoolean
to delete this directory, its subdirectories, and all files; otherwise, .
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