org.milyn.io
Class FileUtils
java.lang.Object
org.milyn.io.FileUtils
public abstract class FileUtils
- extends Object
File utilities.
- Author:
- tom.fennelly@jboss.com
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FileUtils
public FileUtils()
copyFile
public static void copyFile(String from,
String to)
throws IOException
- Throws:
IOException
readFile
public static byte[] readFile(File file)
throws IOException
- Read the contents of the specified file.
- Parameters:
file - The file to read.
- Returns:
- The file contents.
- Throws:
IOException - Error readiong file.
writeFile
public static void writeFile(byte[] bytes,
File file)
throws IOException
- Throws:
IOException
deleteDir
public static boolean deleteDir(File dir)
- Delete directory structure.
Performs a recursive delete.
- Parameters:
dir - The directory to be deleted.
- Returns:
- true of the directory is deleted, otherwise false.
Copyright © 2018. All rights reserved.