public class TestFileUtils extends Object
Modifier and Type | Method and Description |
---|---|
static long |
copyFile(File source,
File target) |
static File |
createTempDir() |
static File |
createTempDir(String suffix) |
static File |
createTempFile(byte[] pattern,
int repeat) |
static File |
createTempFile(String contents) |
static void |
deleteFile(File file) |
static void |
deleteTempFiles() |
static boolean |
mkdirs(File directory) |
static byte[] |
readBytes(File file) |
static void |
readProps(File file,
Properties props) |
static String |
readString(File file) |
static void |
writeBytes(File file,
byte[] pattern,
int repeat) |
static void |
writeProps(File file,
Properties props) |
static void |
writeString(File file,
String content) |
public static void deleteTempFiles() throws IOException
IOException
public static void deleteFile(File file) throws IOException
IOException
public static File createTempFile(String contents) throws IOException
IOException
public static File createTempFile(byte[] pattern, int repeat) throws IOException
IOException
public static File createTempDir() throws IOException
IOException
public static File createTempDir(String suffix) throws IOException
IOException
public static long copyFile(File source, File target) throws IOException
IOException
public static byte[] readBytes(File file) throws IOException
IOException
public static void writeBytes(File file, byte[] pattern, int repeat) throws IOException
IOException
public static String readString(File file) throws IOException
IOException
public static void writeString(File file, String content) throws IOException
IOException
public static void readProps(File file, Properties props) throws IOException
IOException
public static void writeProps(File file, Properties props) throws IOException
IOException
Copyright © 2010–2018 The Apache Software Foundation. All rights reserved.