class CompressedDirectory extends Object
| Modifier and Type | Class and Description |
|---|---|
private static class |
CompressedDirectory.Visitor |
| Modifier and Type | Field and Description |
|---|---|
private static int |
DEFAULT_FILE_MODE
Default mode to be applied to tar file entries if detailed Posix-compliant mode cannot be
obtained.
|
private static org.slf4j.Logger |
log |
private static String |
POSIX_FILE_VIEW
Identifier used to indicate the OS supports a Posix compliant view of the file system.
|
| Constructor and Description |
|---|
CompressedDirectory() |
| Modifier and Type | Method and Description |
|---|---|
static File |
create(Path directory)
This method creates a gzip tarball of the specified directory.
|
static File |
create(String directory)
This method creates a gzip tarball of the specified directory.
|
static boolean |
delete(File file)
Convenience method for deleting files.
|
private static final org.slf4j.Logger log
private static final int DEFAULT_FILE_MODE
private static final String POSIX_FILE_VIEW
public static File create(String directory) throws IOException
File.createTempFile(String, String) method. If the method returns successfully, it is
the caller's responsibility to delete the file.directory - the directory to compressIOExceptionpublic static File create(Path directory) throws IOException
File.createTempFile(String, String) method. If the method returns successfully, it is
the caller's responsibility to delete the file.directory - the directory to compressIOExceptionpublic static boolean delete(File file)
file - the file to delete.Copyright © 2014. All rights reserved.