Package com.appslandia.common.utils
Class FileUtils
- java.lang.Object
-
- com.appslandia.common.utils.FileUtils
-
public class FileUtils extends java.lang.Object- Author:
- Loc Ha
-
-
Constructor Summary
Constructors Constructor Description FileUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidcopyRecursively(java.nio.file.Path src, java.nio.file.Path dest)static voiddeleteRecursively(java.nio.file.Path root)static java.nio.file.Pathmkdirs(java.lang.String dir)static java.lang.StringreadContent(java.nio.file.Path src)static java.lang.StringreadContent(java.nio.file.Path path, java.nio.charset.Charset charset)static voidwriteContent(java.nio.file.Path path, java.lang.String content)static voidwriteContent(java.nio.file.Path path, java.lang.String content, java.nio.charset.Charset charset)
-
-
-
Method Detail
-
mkdirs
public static java.nio.file.Path mkdirs(java.lang.String dir)
-
writeContent
public static void writeContent(java.nio.file.Path path, java.lang.String content) throws java.io.IOException- Throws:
java.io.IOException
-
writeContent
public static void writeContent(java.nio.file.Path path, java.lang.String content, java.nio.charset.Charset charset) throws java.io.IOException- Throws:
java.io.IOException
-
readContent
public static java.lang.String readContent(java.nio.file.Path src) throws java.io.IOException- Throws:
java.io.IOException
-
readContent
public static java.lang.String readContent(java.nio.file.Path path, java.nio.charset.Charset charset) throws java.io.IOException- Throws:
java.io.IOException
-
deleteRecursively
public static void deleteRecursively(java.nio.file.Path root) throws java.io.IOException- Throws:
java.io.IOException
-
copyRecursively
public static void copyRecursively(java.nio.file.Path src, java.nio.file.Path dest) throws java.io.IOException- Throws:
java.io.IOException
-
-