public class OverwriteConfirmation
extends java.lang.Object
The output classes use an instance of this class to check if they can overwrite a given file. Implementations of this class may prompt the user on the console, pop up a modal "OK to overwrite" dialog, etc. This default implementation OKs to overwrite any file without any user interaction.
Constructor and Description |
---|
OverwriteConfirmation() |
Modifier and Type | Method and Description |
---|---|
boolean |
okToOverwrite(java.lang.String fileName,
boolean oneFile)
Checks if a file to write exists, and if so, if it can be overwritten.
|
public boolean okToOverwrite(java.lang.String fileName, boolean oneFile)
fileName
- the file SDMetrics wants to write tooneFile
- true
if this is a single file export,
false
if this is a multi file export (and a dialog
may offer a "yes to all" option)true
if the file does not exist yet or can be
overwritten, false
if the exists and must not be
overwritten.