| |
|
| java.lang.Object com.izforge.izpack.util.LibraryRemover
LibraryRemover | public class LibraryRemover (Code) | | This class tries to remove a given list of files which are locked by this process. For this the
paths of the files are stored in a temporary file and a new process will be created. The class
files which are needed by the new process will be unpacked from the jar file under users temp dir
in a "sandbox". The new process receive the path of the temporary file and some other
information. After a wait intervall it reads the path file and removes all files which there are
listed. Next the created "sandbox" and the path file will be removed. This class uses the
characteristik of the system loader that jar files will be keeped open, simple class files will
be closed after loading a class. Therefore jar files are locked and cannot be deleted, class
files are not locked and deletable.
The idea for this stuff is copied from Chadwick McHenry's SelfModifier in the uninstaller stuff
of IzPack.
author: Klaus Bartz |
Inner Class :public static class StreamProxy extends Thread | |
Field Summary | |
PrintStream | log --------------------------------------------------------------------- Logging
--------------------------------------------------------------------- Copied from
com.izforge.izpack.uninstaller.SelfModifier. |
Method Summary | |
public static boolean | deleteTree(File file) Recursively delete a file structure. | public static void | invoke(List<String> temporaryFileNames) Entry point for phase 1. | public static void | main(String[] args) |
log | PrintStream log(Code) | | --------------------------------------------------------------------- Logging
--------------------------------------------------------------------- Copied from
com.izforge.izpack.uninstaller.SelfModifier.
|
deleteTree | public static boolean deleteTree(File file)(Code) | | Recursively delete a file structure. Copied from com.izforge.izpack.uninstaller.SelfModifier.
Little addaption to this class.
command for spawning |
invoke | public static void invoke(List<String> temporaryFileNames) throws IOException(Code) | | Entry point for phase 1. This class tries to remove all files given in the Vector.
Parameters: temporaryFileNames - throws: IOException - |
|
|
|