public class Files2 extends Object
| Constructor and Description |
|---|
Files2() |
| Modifier and Type | Method and Description |
|---|---|
static void |
chmodAddReadExecute(Path path) |
static void |
chmodAddReadWrite(Path path) |
static void |
chmodReadExecute(Path path)
Deprecated.
|
static void |
chmodReadOnly(Path path) |
static void |
chmodReadWrite(Path path)
Deprecated.
|
static void |
chmodSetReadOnly(Path path) |
static Path |
copyArtifactToDirectory(Path sourceDir,
String artifactId,
Path dest) |
static void |
copyDirectoryContent(Path fromDir,
Path toDir) |
static Path |
copyToDirectory(Path source,
Path dest) |
static void |
deleteDirectory(Path dir) |
static void |
dump(Path path) |
static Path |
findArtifact(Path source,
String artifactId) |
static Path |
findArtifact(Path source,
String artifactId,
String type) |
static Path |
findUniqueChildDirectory(Path source) |
static Path |
findUniqueDirectoryBeginningWith(Path source,
String pattern) |
static Path |
findUniqueFolderBeginningWith(Path source,
String pattern)
Deprecated.
|
static void |
untgz(Path tgzFile,
Path destDir)
TODO recopy file permissions
Uncompress the specified tgz file to the specified destination directory.
|
static void |
untgz(String tgzFilename,
String destDirname)
Uncompress the specified tgz file to the specified destination directory.
|
static void |
unzip(Path zipFile,
Path destDir) |
static void |
unzip(String zipFilename,
String destDirname)
Unzips the specified zip file to the specified destination directory.
|
static void |
unzipSubDirectoryIfExists(Path zipFile,
String zipSubPath,
Path destDir) |
public static void deleteDirectory(Path dir) throws IOException
IOExceptionpublic static void chmodReadOnly(Path path) throws IOException
IOExceptionpublic static void chmodSetReadOnly(@Nonnull Path path) throws IOException
IOExceptionpublic static void chmodAddReadExecute(@Nonnull Path path) throws IOException
IOExceptionpublic static void chmodAddReadWrite(@Nonnull Path path) throws IOException
IOException@Deprecated public static void chmodReadExecute(Path path) throws IOException
chmodAddReadExecute(java.nio.file.Path)IOException@Deprecated public static void chmodReadWrite(Path path) throws IOException
chmodAddReadWrite(java.nio.file.Path)IOExceptionpublic static void unzip(String zipFilename, String destDirname) throws IOException
zipFilename - the name of the zip file to extractdestDirname - the directory to unzip toIOExceptionpublic static void unzipSubDirectoryIfExists(Path zipFile, String zipSubPath, Path destDir) throws IOException
IOExceptionpublic static void unzip(Path zipFile, Path destDir) throws IOException
IOExceptionpublic static void untgz(String tgzFilename, String destDirname) throws IOException
tgzFilename - the name of the zip file to extractdestDirname - the directory to unzip toIOExceptionpublic static void untgz(@Nonnull Path tgzFile, @Nonnull Path destDir) throws IOException
tgzFile - the name of the zip file to extractdestDir - the directory to unzip toIOExceptionpublic static void dump(Path path) throws IOException
IOExceptionpublic static void copyDirectoryContent(Path fromDir, Path toDir) throws IOException
IOException@Nonnull public static Path copyToDirectory(@Nonnull Path source, @Nonnull Path dest) throws IOException
IOException@Nonnull public static Path copyArtifactToDirectory(@Nonnull Path sourceDir, @Nonnull String artifactId, @Nonnull Path dest) throws IOException
IOException@Nonnull public static Path findArtifact(@Nonnull Path source, @Nonnull String artifactId) throws IOException
IOException@Deprecated @Nonnull public static Path findUniqueFolderBeginningWith(@Nonnull Path source, @Nullable String pattern) throws IOException, NoSuchElementException, IllegalStateException
findUniqueDirectoryBeginningWith(java.nio.file.Path, String)@Nonnull public static Path findUniqueDirectoryBeginningWith(Path source, String pattern) throws IOException
IOException@Nonnull public static Path findUniqueChildDirectory(Path source) throws IOException
IOException@Nonnull public static Path findArtifact(@Nonnull Path source, @Nonnull String artifactId, @Nonnull String type) throws IOException
IOExceptionCopyright © 2013. All Rights Reserved.