DeleteDirectoryOption 枚举

定义

指定当要删除的目录中含有文件或目录时应采取的操作。Specifies what should be done when a directory that is to be deleted contains files or directories.

public enum class DeleteDirectoryOption
public enum DeleteDirectoryOption
type DeleteDirectoryOption = 
Public Enum DeleteDirectoryOption
继承
DeleteDirectoryOption

字段

DeleteAllContents 5

将目录内容随目录一起删除。Delete the contents of the directory along with the directory. 默认。Default.

ThrowIfDirectoryNonEmpty 4

如果目录不为空,则引发 IOExceptionThrow an IOException if the directory is not empty. 异常的 Data 属性会列出未能删除的文件。The Data property of the exception lists the file(s) that could not be deleted.

注解

此枚举与DeleteDirectory方法一起使用。This enumeration is used with the DeleteDirectory method.

适用于

另请参阅