public class TestFileUtils extends Object
Constructor and Description |
---|
TestFileUtils() |
Modifier and Type | Method and Description |
---|---|
static void |
assertContent(byte[] expected,
File file) |
static void |
assertContent(String expected,
File file) |
static long |
copy(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 |
delete(File file) |
static void |
deleteTempFiles() |
static byte[] |
getContent(File file) |
static boolean |
mkdirs(File directory) |
static void |
read(Properties props,
File file) |
static void |
write(byte[] pattern,
int repeat,
File file) |
static void |
write(Properties props,
File file) |
static void |
write(String content,
File file) |
public static void deleteTempFiles() 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 void write(String content, File file) throws IOException
IOException
public static void write(byte[] pattern, int repeat, File file) throws IOException
IOException
public static long copy(File source, File target) throws IOException
IOException
public static void delete(File file) throws IOException
IOException
public static byte[] getContent(File file) throws IOException
IOException
public static void assertContent(byte[] expected, File file) throws IOException
IOException
public static void assertContent(String expected, File file) throws IOException
IOException
public static boolean mkdirs(File directory)
public static File createTempDir() throws IOException
IOException
public static File createTempDir(String suffix) throws IOException
IOException
public static void read(Properties props, File file) throws IOException
IOException
public static void write(Properties props, File file) throws IOException
IOException
Copyright © 2010-2012 Sonatype, Inc.. All Rights Reserved.