Top Description Fields Constructors Methods
com.google.common.io

public final Enum RecursiveDeleteOption

extends Enum<RecursiveDeleteOption>
Class Inheritance
Annotations
@J2ktIncompatible
@GwtIncompatible
@J2ObjCIncompatible
@ElementTypesAreNonnullByDefault
Imports
com.google.common.annotations.GwtIncompatible, .J2ktIncompatible, com.google.j2objc.annotations.J2ObjCIncompatible, java.nio.file.SecureDirectoryStream

Options for use with recursive delete methods (MoreFiles#deleteRecursively and MoreFiles#deleteDirectoryContents).
Author
Colin Decker
Since
21.0

Field Summary

Modifier and TypeField and Description
public static final RecursiveDeleteOption
ALLOW_INSECURE

Specifies that the recursive delete should not throw an exception when it can't be guaranteed that it can be done securely, without vulnerability to race conditions (i.e. when the file system does not support SecureDirectoryStream).

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static RecursiveDeleteOption
public static RecursiveDeleteOption[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinaltoStringvalueOf

Field Detail

ALLOW_INSECUREback to summary
public static final RecursiveDeleteOption ALLOW_INSECURE

Specifies that the recursive delete should not throw an exception when it can't be guaranteed that it can be done securely, without vulnerability to race conditions (i.e. when the file system does not support SecureDirectoryStream).

Warning

On a file system that supports symbolic links, it is possible for an insecure recursive delete to delete files and directories that are outside the directory being deleted. This can happen if, after checking that a file is a directory (and not a symbolic link), that directory is deleted and replaced by a symbolic link to an outside directory before the call that opens the directory to read its entries. File systems that support SecureDirectoryStream do not have this vulnerability.

Constructor Detail

RecursiveDeleteOptionback to summary
private RecursiveDeleteOption()

Method Detail

valueOfback to summary
public static RecursiveDeleteOption valueOf(String name)
valuesback to summary
public static RecursiveDeleteOption[] values()