liquibase.util
Class FileUtil

java.lang.Object
  extended by liquibase.util.FileUtil

public class FileUtil
extends Object


Constructor Summary
FileUtil()
           
 
Method Summary
static void forceDeleteOnExit(File file)
          Schedule a file to be deleted when JVM exits.
static String getContents(File file)
           
static File unzip(File zipFile)
          Unzips the given zip file and returns a File object corresponding to the root directory.
static void write(String contents, File file)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileUtil

public FileUtil()
Method Detail

forceDeleteOnExit

public static void forceDeleteOnExit(File file)
Schedule a file to be deleted when JVM exits. If file is directory delete it and all sub-directories.


unzip

public static File unzip(File zipFile)
                  throws IOException
Unzips the given zip file and returns a File object corresponding to the root directory. The returned directory is a temporary directory that will be deleted on application exit.

Throws:
IOException

getContents

public static String getContents(File file)
                          throws IOException
Throws:
IOException

write

public static void write(String contents,
                         File file)
                  throws IOException
Throws:
IOException


Copyright © 2014 Liquibase.org. All rights reserved.