Top Description Fields Constructors Methods
org.h2.tools

public Class DeleteDbFiles

extends Tool
Class Inheritance
Imports
java.sql.SQLException, java.util.ArrayList, org.h2.engine.Constants, org.h2.store.FileLister, org.h2.store.fs.FileUtils, org.h2.util.Tool

Deletes all files belonging to a database. The database must be closed before calling this tool.

Field Summary

Inherited from org.h2.util.Tool:
out

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public static void
execute(String
the directory
dir
,
String
the database name (null for all databases)
db
,
boolean
don't print progress information
quiet
)

Deletes the database files.

public static void
main(String...
the command line arguments
args
)

Options are case sensitive.

private void
process(String
the directory
dir
,
String
the database name (null for all databases)
db
,
boolean
don't print progress information
quiet
)

Deletes the database files.

private static void
process(String fileName, boolean quiet)

public void
runTool(String...
the argument list
args
)

Implements abstract org.h2.util.Tool.runTool.

Run the tool with the given output stream and arguments.

Inherited from org.h2.util.Tool:
getMainClassNameisOptionprintNoDatabaseFilesFoundsetOutshowUsageshowUsageAndThrowUnsupportedOptionthrowUnsupportedOption

Constructor Detail

DeleteDbFilesback to summary
public DeleteDbFiles()

Method Detail

executeback to summary
public static void execute(String dir, String db, boolean quiet)

Deletes the database files.

Parameters
dir:String

the directory

db:String

the database name (null for all databases)

quiet:boolean

don't print progress information

mainback to summary
public static void main(String... args) throws SQLException

Options are case sensitive.

Supported options
[-help] or [-?] Print the list of options
[-dir <dir>] The directory (default: .)
[-db <database>] The database name
[-quiet] Do not print progress information
Parameters
args:String[]

the command line arguments

Exceptions
SQLException:
on failure
processback to summary
private void process(String dir, String db, boolean quiet)

Deletes the database files.

Parameters
dir:String

the directory

db:String

the database name (null for all databases)

quiet:boolean

don't print progress information

processback to summary
private static void process(String fileName, boolean quiet)
runToolback to summary
public void runTool(String... args) throws SQLException

Implements abstract org.h2.util.Tool.runTool.

Doc from org.h2.util.Tool.runTool.

Run the tool with the given output stream and arguments.

Parameters
args:String[]

the argument list

Annotations
@Override
Exceptions
SQLException:
on failure