public class FileUtil extends Object
| Constructor and Description |
|---|
FileUtil() |
| Modifier and Type | Method and Description |
|---|---|
static void |
copy(File source,
File target) |
static void |
copyAndCloseSource(InputStream source,
File target) |
static void |
copyDirectory(File source,
File target) |
static void |
delete(File file) |
static void |
deleteDir(String path) |
static File |
leastCommonParent(File a,
File b) |
static String |
readString(File file) |
static String |
relativePath(File src,
File target) |
static String |
relativePath(String src,
String target) |
public static void copyDirectory(File source, File target) throws IOException
IOExceptionpublic static void copy(File source, File target) throws IOException
IOExceptionpublic static void copyAndCloseSource(InputStream source, File target) throws IOException
IOExceptionpublic static String readString(File file) throws IOException
IOExceptionpublic static void deleteDir(String path)
public static void delete(File file)
Copyright © 2019. All rights reserved.