visad.install
Class Util
- java.lang.Object
-
- visad.install.Util
-
public class Util extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor and Description Util()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method and Description static booleancopyDirectory(java.io.File source, java.io.File target)static booleancopyDirectory(java.io.File source, java.io.File target, java.lang.String saveSuffix)static booleancopyDirectory(ProgressMonitor progress, java.io.File source, java.io.File target)static booleancopyDirectory(ProgressMonitor progress, java.io.File source, java.io.File target, java.lang.String saveSuffix)Copy files under the source directory to the target directory.static booleancopyFile(java.io.File source, java.io.File target)static booleancopyFile(java.io.File source, java.io.File target, java.lang.String saveSuffix)static booleancopyFile(ProgressMonitor progress, java.io.File source, java.io.File target)static booleancopyFile(ProgressMonitor progress, java.io.File source, java.io.File target, java.lang.String saveSuffix)Copy the source file to target.static booleancopyJar(java.io.File source, java.io.File target)static booleancopyJar(java.io.File source, java.io.File target, java.lang.String saveSuffix)static booleancopyJar(ProgressMonitor progress, java.io.File source, java.io.File target)static booleancopyJar(ProgressMonitor progress, java.io.File source, java.io.File target, java.lang.String saveSuffix)Extract files from the source jar file to the target directory.static java.lang.StringgetPath(java.io.File f)
-
-
-
Method Detail
-
copyDirectory
public static final boolean copyDirectory(java.io.File source, java.io.File target)
-
copyDirectory
public static final boolean copyDirectory(ProgressMonitor progress, java.io.File source, java.io.File target)
-
copyDirectory
public static final boolean copyDirectory(java.io.File source, java.io.File target, java.lang.String saveSuffix)
-
copyDirectory
public static final boolean copyDirectory(ProgressMonitor progress, java.io.File source, java.io.File target, java.lang.String saveSuffix)
Copy files under the source directory to the target directory. If necessary, target directory is created.
For example, if this method is called with a source of /foo (which contains /foo/a and /foo/b) and a target of /bar, when this method exits /bar will contain /bar/a and /bar/b. Note that foo itself is not copied.- Parameters:
progress- if non-null, this progress monitor is updated with the name of each file as it is copied.source- source directorytarget- directorysaveSuffix- if non-null, pre-existing files under target whose paths match files to be copied from source will be renamed to name + saveSuffix.- Returns:
- false if any problems were encountered.
-
copyFile
public static final boolean copyFile(java.io.File source, java.io.File target)
-
copyFile
public static final boolean copyFile(ProgressMonitor progress, java.io.File source, java.io.File target)
-
copyFile
public static final boolean copyFile(java.io.File source, java.io.File target, java.lang.String saveSuffix)
-
copyFile
public static final boolean copyFile(ProgressMonitor progress, java.io.File source, java.io.File target, java.lang.String saveSuffix)
Copy the source file to target. If target does not exist, it is assumed to be the name of the copied file. If target is a directory, the file will be copied into that directory.- Parameters:
progress- if non-null, this progress monitor is updated with the name of each file as it is copied.source- source directorytarget- target file/directorysaveSuffix- if non-null and target exists, target will be renamed to name + saveSuffix.- Returns:
- false if any problems were encountered.
-
copyJar
public static final boolean copyJar(java.io.File source, java.io.File target)
-
copyJar
public static final boolean copyJar(ProgressMonitor progress, java.io.File source, java.io.File target)
-
copyJar
public static final boolean copyJar(java.io.File source, java.io.File target, java.lang.String saveSuffix)
-
copyJar
public static final boolean copyJar(ProgressMonitor progress, java.io.File source, java.io.File target, java.lang.String saveSuffix)
Extract files from the source jar file to the target directory. If necessary, the target directory is created.
For example, if this method is called with a source of foo.jar (which contains a and b) and a target of /bar, when this method exits /bar will contain /bar/a and /bar/b.- Parameters:
progress- if non-null, this progress monitor is updated with the name of each file as it is copied.source- source jar filetarget- directorysaveSuffix- if non-null, pre-existing files in target whose paths match files to be copied from source will be renamed to name + saveSuffix.- Returns:
- false if any problems were encountered.
-
getPath
public static final java.lang.String getPath(java.io.File f)
- Returns:
- either the canonical path or, if that is not available, the absolute path.
-
-
DMelt 3.0 © DataMelt by jWork.ORG