Package com.qcefast.util
Class FileMnpltr
- java.lang.Object
-
- com.qcefast.util.FileMnpltr
-
public class FileMnpltr extends java.lang.Object
This aids with the manipulation of files and folders- Since:
- 1.0.0
-
-
Constructor Summary
Constructors Constructor Description FileMnpltr()
-
Method Summary
Modifier and Type Method Description static void
copyFile(java.lang.String copyfrom, java.lang.String copyto)
Copies files from one location to anotherstatic void
copyFolder(java.io.File src, java.io.File dest)
Copies a folder from one location to anotherstatic void
deleteFile(java.lang.String deleteFilePath)
Deletes a file at the specified pathstatic void
findReplaceString(java.lang.String filePath, java.lang.String replaceString, java.lang.String replaceWithString)
Replace a string from a file with another stringstatic boolean
findStringInFile(java.lang.String file, java.lang.String stringToFind)
Searches for a string within a file and returns whether or not it was foundstatic void
moveFile(java.lang.String movefrom, java.lang.String target)
Move/rename a file from one location to anotherstatic void
writeBootstrapFromJar(java.util.jar.JarFile jarFile, java.lang.String bootstrapDirPath)
When running the FAST Framework from a .jar file, the bootstrap files for the detailed reports folder needs to be copied out from the jar file.
-
-
-
Method Detail
-
moveFile
public static void moveFile(java.lang.String movefrom, java.lang.String target)
Move/rename a file from one location to another- Parameters:
movefrom
- Source filetarget
- Destination- Since:
- 1.0.0
-
copyFile
public static void copyFile(java.lang.String copyfrom, java.lang.String copyto) throws FastException
Copies files from one location to another- Parameters:
copyfrom
- Source filecopyto
- Destination- Throws:
FastException
- If an error occurs during execution- Since:
- 1.0.0
-
copyFolder
public static void copyFolder(java.io.File src, java.io.File dest) throws FastException
Copies a folder from one location to another- Parameters:
src
- Source folderdest
- Destination- Throws:
FastException
- If an error occurs during execution- Since:
- 1.0.0
-
deleteFile
public static void deleteFile(java.lang.String deleteFilePath) throws FastException
Deletes a file at the specified path- Parameters:
deleteFilePath
- the filepath to the file that needs to be deleted- Throws:
FastException
- If an error occurs during execution- Since:
- 1.0.0
-
findStringInFile
public static boolean findStringInFile(java.lang.String file, java.lang.String stringToFind) throws FastException
Searches for a string within a file and returns whether or not it was found- Parameters:
file
- The path to the file being readstringToFind
- The string being searched for- Returns:
- true if the stringToFind was found inside
- Throws:
FastException
- If an error occurs during execution
-
findReplaceString
public static void findReplaceString(java.lang.String filePath, java.lang.String replaceString, java.lang.String replaceWithString) throws FastException
Replace a string from a file with another string- Parameters:
filePath
- The path to the filereplaceString
- The string to be replacedreplaceWithString
- The new string- Throws:
FastException
- If an error occurs during execution- Since:
- 1.0.0
-
writeBootstrapFromJar
public static void writeBootstrapFromJar(java.util.jar.JarFile jarFile, java.lang.String bootstrapDirPath) throws FastException
When running the FAST Framework from a .jar file, the bootstrap files for the detailed reports folder needs to be copied out from the jar file.- Parameters:
jarFile
- a jar filebootstrapDirPath
- file path of the location that the bootstrap files will be copied to- Throws:
FastException
- If an error occurs during execution- Since:
- 1.0.0
-
-