Package io.quarkus.bootstrap.util
Class IoUtils
- java.lang.Object
-
- io.quarkus.bootstrap.util.IoUtils
-
public class IoUtils extends Object
- Author:
- Alexey Loubyansky
-
-
Constructor Summary
Constructors Constructor Description IoUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidcopy(OutputStream out, InputStream in)static Pathcopy(Path source, Path target)static voidcreateOrEmptyDir(Path dir)Creates a new empty directory or empties an existing one.static PathcreateRandomDir(Path parentDir)static PathcreateRandomTmpDir()static PathcreateTmpDir(String name)static Pathmkdirs(Path dir)static StringreadFile(Path file)static voidrecursiveDelete(Path root)static voidwriteFile(Path file, String content)
-
-
-
Method Detail
-
createRandomTmpDir
public static Path createRandomTmpDir()
-
recursiveDelete
public static void recursiveDelete(Path root)
-
createOrEmptyDir
public static void createOrEmptyDir(Path dir) throws IOException
Creates a new empty directory or empties an existing one.- Parameters:
dir- directory- Throws:
IOException- in case of a failure
-
copy
public static Path copy(Path source, Path target) throws IOException
- Throws:
IOException
-
readFile
public static String readFile(Path file) throws IOException
- Throws:
IOException
-
copy
public static void copy(OutputStream out, InputStream in) throws IOException
- Throws:
IOException
-
writeFile
public static void writeFile(Path file, String content) throws IOException
- Throws:
IOException
-
-