public class CompareToolUtil extends Object
Constructor and Description |
---|
CompareToolUtil() |
Modifier and Type | Method and Description |
---|---|
static String |
buildPath(String path, String[] fragments) |
static void |
copy(String inputFile, String outputFile)
Creates a copy of a file.
|
static String |
createTempCopy(String file, String tempFilePrefix, String tempFilePostfix)
Creates a temporary copy of a file.
|
static String |
createTempDirectory(String tempFilePrefix)
Creates a temporary directory.
|
static List<String> |
prepareProcessArguments(String exec, String params) |
static boolean |
removeFiles(String[] paths)
Removes all of the passed files.
|
static Process |
runProcess(String execPath, String params) |
static List<String> |
splitIntoProcessArguments(String line) |
public static String createTempCopy(String file, String tempFilePrefix, String tempFilePostfix) throws IOException
file
- the path to the file to be copied
tempFilePrefix
- the prefix of the copied file's name
tempFilePostfix
- the postfix of the copied file's name
IOException
public static void copy(String inputFile, String outputFile) throws IOException
inputFile
- the path to the file to be copied
outputFile
- the path, to which the passed file should be copied
IOException
public static String createTempDirectory(String tempFilePrefix) throws IOException
tempFilePrefix
- the prefix of the temporary directory's name
IOException
public static boolean removeFiles(String[] paths)
paths
- paths to files, which should be removed
public static Process runProcess(String execPath, String params) throws IOException, InterruptedException
IOException
InterruptedException
public static List<String> prepareProcessArguments(String exec, String params)
Copyright © 1998–2022. All rights reserved.