public class FileHelper extends Object
Modifier and Type | Field and Description |
---|---|
static long |
DEFAULT_COPY_BUFFER_SIZE |
Modifier and Type | Method and Description |
---|---|
static boolean |
areInSync(File source,
File destination) |
static void |
delete(File file)
Deprecated.
|
static void |
delete(Path path)
Deletes a file.
|
static void |
synchronize(File source,
File destination,
boolean smart) |
static void |
synchronize(File source,
File destination,
boolean smart,
long chunkSize) |
static void |
tryDelete(Path path)
Attempts to delete a file.
|
public static final long DEFAULT_COPY_BUFFER_SIZE
public static boolean areInSync(File source, File destination) throws IOException
IOException
public static void synchronize(File source, File destination, boolean smart) throws IOException
IOException
public static void synchronize(File source, File destination, boolean smart, long chunkSize) throws IOException
IOException
@Deprecated public static void delete(File file) throws IOException
IOException
public static void delete(Path path) throws IOException
path
- the file or directory to be deletedIOException
- if it wasn't possible to delete all content.public static void tryDelete(Path path) throws IOException
path
- the file or directory to be deletedIOException
- on unexpected io errorsCopyright © 2006-2017 Red Hat, Inc. All Rights Reserved