|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.xebialabs.deployit.hostsession.HostFileUtils
public class HostFileUtils
Contains a number of convenience methods for working with HostFile objects.
| Constructor Summary | |
|---|---|
HostFileUtils()
|
|
| Method Summary | |
|---|---|
static void |
copy(HostFile src,
HostFile dst)
Copies a file or directory. |
static void |
copy(HostFile src,
HostFile dst,
HostFileInputStreamTransformer transformer)
Copies a file or directory. |
static void |
copyDirectory(HostFile srcDir,
HostFile dstDir)
Copies a directory recursively. |
static void |
copyDirectory(HostFile srcDir,
HostFile dstDir,
HostFileInputStreamTransformer transformer)
Copies a directory recursively. |
static void |
copyFile(HostFile srcFile,
HostFile dstFile)
Copies a regular file. |
static void |
copyFile(HostFile srcFile,
HostFile dstFile,
HostFileInputStreamTransformer transformer)
Copies a regular file. |
static java.lang.String |
getHostFileAsString(HostFile sourceHostFile)
Reads the contents of a HostFile as a string. |
static void |
putStringToHostFile(java.lang.String sourceString,
HostFile targetFile)
Copies the contents of a string to a HostFile. |
static void |
unzip(HostFile zip,
HostFile dir)
Unzips a host file. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public HostFileUtils()
| Method Detail |
|---|
public static void copy(HostFile src,
HostFile dst)
src - the source file or directory.dst - the destination file or directory. If it exists it must be of the same type as the source. Its parent
directory must exist.
RuntimeIOException - if an I/O error occurred
public static void copy(HostFile src,
HostFile dst,
HostFileInputStreamTransformer transformer)
src - the source file or directory.dst - the destination file or directory. If it exists it must be of the same type as the source. Its parent
directory must exist.transformer - Transforms the inputstream of the sourcefile, can supply null
RuntimeIOException - if an I/O error occurred
public static void copyFile(HostFile srcFile,
HostFile dstFile)
throws RuntimeIOException
srcFile - the source file. Must exists and must not be a directory.dstFile - the destination file. May exists but must not be a directory. Its parent directory must exist.
RuntimeIOException - if an I/O error occurred
public static void copyFile(HostFile srcFile,
HostFile dstFile,
HostFileInputStreamTransformer transformer)
throws RuntimeIOException
srcFile - the source file. Must exists and must not be a directory.dstFile - the destination file. May exists but must not be a directory. Its parent directory must exist.transformer - Transforms the inputstream of the sourcefile, can be null
RuntimeIOException - if an I/O error occurred
public static void copyDirectory(HostFile srcDir,
HostFile dstDir)
throws RuntimeIOException
srcDir - the source directory. Must exist and must not be a directory.dstDir - the destination directory. May exists but must a directory. Its parent directory must exist.
RuntimeIOException - if an I/O error occurred
public static void copyDirectory(HostFile srcDir,
HostFile dstDir,
HostFileInputStreamTransformer transformer)
throws RuntimeIOException
srcDir - the source directory. Must exist and must not be a directory.dstDir - the destination directory. May exists but must a directory. Its parent directory must exist.transformer - Transforms the inputstream of the sourcefile, can be null
RuntimeIOException - if an I/O error occurred
public static void putStringToHostFile(java.lang.String sourceString,
HostFile targetFile)
HostFile.
sourceString - the string to copy.targetFile - the host file to copy to.public static java.lang.String getHostFileAsString(HostFile sourceHostFile)
HostFile as a string.
sourceHostFile - the host file to read.
public static void unzip(HostFile zip,
HostFile dir)
zip - the file to unzip.dir - the directory to unzip to.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||