类 Zips

java.lang.Object
net.apexes.commons.lang.Zips

public final class Zips extends Object
作者:
HeDYn
  • 构造器详细资料

    • Zips

      public Zips()
  • 方法详细资料

    • unzip

      public static void unzip(Path zipFile, Path descDir) throws Exception
      将指定的zip文件中的内容(不含zip文件名目录)解压缩到descDir目录中
      参数:
      zipFile - 要解压缩的zip文件
      descDir - zip文件中的内容要解压缩到的目标目录
      抛出:
      Exception
    • unzipSafeOverwrite

      public static void unzipSafeOverwrite(Path zipFile, Path descDir) throws Exception
      抛出:
      Exception
    • unzip

      public static void unzip(Path zipFile, Path descDir, boolean safeOverwrite) throws Exception
      将指定的zip文件中的内容(不含zip文件名目录)解压缩到descDir目录中
      参数:
      zipFile - 要解压缩的zip文件
      descDir - zip文件中的内容要解压缩到的目标目录
      safeOverwrite - 为true时,如果目标文件存在将采用先解压缩到 .temp 文件,再重命名为目标文件的方式
      抛出:
      Exception
    • keepStructure

      public static Zips.ZipCompress keepStructure()
    • notStructure

      public static Zips.ZipCompress notStructure()