@Beta @ParametersAreNonnullByDefault public final class Compress extends Object
Modifier and Type | Method and Description |
---|---|
static void |
copyFileAtomic(Path source,
Path destinationFile)
Copy file atomic.
|
static List<Path> |
unzip(Path zipFile)
Unzip a zip archive to same folder.
|
static List<Path> |
unzip(Path zipFile,
Path destinationDirectory)
Unzip a zip file to a destination folder.
|
static List<Path> |
unzip(Path zipFile,
Path destinationDirectory,
Predicate<Path> filter)
Unzip a zip file to a destination folder.
|
static List<Path> |
unzip2(Path zipFile,
Path destinationDirectory) |
static List<Path> |
unzip2(Path zipFile,
Path destDir,
Predicate<Path> filter) |
static Path |
zip(Path fileOrFolderToCompress)
Zip a file or folder.
|
static void |
zip(Path fileOrFolderToCompress,
Path destFile)
Zip a file or folder.
|
static void |
zip(Path fileOrFolderToCompress,
Path destFile,
Predicate<Path> filter)
Zip a file or folder.
|
@Nonnull public static Path zip(Path fileOrFolderToCompress) throws IOException
fileOrFolderToCompress
- file or folder to compress.IOException
@Nonnull public static void zip(Path fileOrFolderToCompress, Path destFile) throws IOException
fileOrFolderToCompress
- file or folder to compress.destFile
- the destination zip file.IOException
@Nonnull public static void zip(Path fileOrFolderToCompress, Path destFile, Predicate<Path> filter) throws IOException
fileOrFolderToCompress
- file or folder to compress.destFile
- the destination zip file.IOException
public static void copyFileAtomic(Path source, Path destinationFile) throws IOException
source
- destinationFile
- IOException
@Nonnull public static List<Path> unzip(Path zipFile) throws IOException
zipFile
- IOException
@Nonnull public static List<Path> unzip(Path zipFile, Path destinationDirectory) throws IOException
zipFile
- destinationDirectory
- IOException
- in case extraction fails for whatever reason.@Nonnull public static List<Path> unzip(Path zipFile, Path destinationDirectory, Predicate<Path> filter) throws IOException
zipFile
- destinationDirectory
- IOException
- in case extraction fails for whatever reason.@Nonnull public static List<Path> unzip2(Path zipFile, Path destinationDirectory) throws IOException
IOException
@Nonnull public static List<Path> unzip2(Path zipFile, Path destDir, Predicate<Path> filter) throws IOException
IOException
Copyright © 2018 SPF4J. All rights reserved.