|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.h2.store.FileLister
public class FileLister
Utility class to list the files of a database.
Method Summary | |
---|---|
static java.util.ArrayList<java.lang.String> |
getDatabaseFiles(java.lang.String dir,
java.lang.String db,
boolean all)
Get the list of database files. |
static java.lang.String |
getDatabaseNameFromFileName(java.lang.String fileName)
Extract the name of the database from a given file name. |
static java.lang.String |
getDir(java.lang.String dir)
Normalize the directory name. |
static void |
tryUnlockDatabase(java.util.ArrayList<java.lang.String> files,
java.lang.String message)
Try to lock the database, and then unlock it. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static java.lang.String getDatabaseNameFromFileName(java.lang.String fileName)
fileName
- the file name (without directory)
public static void tryUnlockDatabase(java.util.ArrayList<java.lang.String> files, java.lang.String message) throws java.sql.SQLException
files
- the database files to checkmessage
- the text to include in the error message
java.sql.SQLException
- if it failedpublic static java.lang.String getDir(java.lang.String dir)
dir
- the directory (null for the current directory)
public static java.util.ArrayList<java.lang.String> getDatabaseFiles(java.lang.String dir, java.lang.String db, boolean all)
dir
- the directory (must be normalized)db
- the database name (null for all databases)all
- if true, files such as the lock, trace, and lob
files are included. If false, only data, index, log,
and lob files are returned
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |