Package com.chutneytesting.tools.file
Class FileUtils
- java.lang.Object
-
- com.chutneytesting.tools.file.FileUtils
-
public class FileUtils extends Object
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidcleanFolder(Path folderPath)static voiddeleteFolder(Path folderPath)static <R> RdoOnListFiles(Path path, Function<Stream<Path>,R> exec)static StringgetNameWithoutExtension(Path path)static voidinitFolder(Path folderPath)static List<Path>listFiles(Path folder)static StringreadContent(Path path)static voidwriteContent(Path path, String content)
-
-
-
Method Detail
-
initFolder
public static void initFolder(Path folderPath) throws UncheckedIOException
- Throws:
UncheckedIOException
-
deleteFolder
public static void deleteFolder(Path folderPath)
-
cleanFolder
public static void cleanFolder(Path folderPath)
-
doOnListFiles
public static <R> R doOnListFiles(Path path, Function<Stream<Path>,R> exec) throws UncheckedIOException
- Throws:
UncheckedIOException
-
readContent
public static String readContent(Path path) throws UncheckedIOException
- Throws:
UncheckedIOException
-
writeContent
public static void writeContent(Path path, String content) throws UncheckedIOException
- Throws:
UncheckedIOException
-
-