gpt4 book ai didi

org.zeroturnaround.zip.ZipUtil.removeEntry()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-16 12:12:40 30 4
gpt4 key购买 nike

本文整理了Java中org.zeroturnaround.zip.ZipUtil.removeEntry()方法的一些代码示例,展示了ZipUtil.removeEntry()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ZipUtil.removeEntry()方法的具体详情如下:
包路径:org.zeroturnaround.zip.ZipUtil
类名称:ZipUtil
方法名:removeEntry

ZipUtil.removeEntry介绍

[英]Changes an existing ZIP file: removes entry with a given path.
[中]更改现有ZIP文件:删除具有给定路径的条目。

代码示例

代码示例来源:origin: zeroturnaround/zt-zip

public boolean act(File tmpFile) {
  removeEntry(zip, path, tmpFile);
  return true;
 }
});

代码示例来源:origin: jphp-group/jphp

@Signature
public void remove(Environment env, Memory path) {
  if (path.isTraversable()) {
    ForeachIterator iterator = path.getNewIterator(env);
    List<String> paths = new ArrayList<>();
    while (iterator.next()) {
      String value = iterator.getValue().toString();
      paths.add(value);
    }
    ZipUtil.removeEntries(zipFile, paths.toArray(new String[paths.size()]));
  } else {
    ZipUtil.removeEntry(zipFile, path.toString());
  }
}

代码示例来源:origin: org.zeroturnaround/zt-zip

public boolean act(File tmpFile) {
  removeEntry(zip, path, tmpFile);
  return true;
 }
});

代码示例来源:origin: org.hswebframework/hsweb-expands-compress

public void remove(String entryName) throws IOException {
  ZipUtil.removeEntry(zipFile, entryName);
}

代码示例来源:origin: hs-web/hsweb-expands

public void remove(String entryName) throws IOException {
  ZipUtil.removeEntry(zipFile, entryName);
}

代码示例来源:origin: com.microsoft.azure/azure-maven-plugin-lib

protected File getZipFile() {
    final File zipFile = new File(stagingDirectoryPath + ".zip");
    final File stagingDirectory = new File(stagingDirectoryPath);

    ZipUtil.pack(stagingDirectory, zipFile);
    ZipUtil.removeEntry(zipFile, LOCAL_SETTINGS_FILE);
    return zipFile;
  }
}

代码示例来源:origin: Microsoft/azure-maven-plugins

protected File getZipFile() {
    final File zipFile = new File(stagingDirectoryPath + ".zip");
    final File stagingDirectory = new File(stagingDirectoryPath);

    ZipUtil.pack(stagingDirectory, zipFile);
    ZipUtil.removeEntry(zipFile, LOCAL_SETTINGS_FILE);
    return zipFile;
  }
}

代码示例来源:origin: Microsoft/azure-maven-plugins

protected File createZipPackage() throws Exception {
  logInfo("");
  logInfo(CREATE_ZIP_START);
  final File stageDirectory = new File(stagingDirectoryPath);
  final File zipPackage = new File(stagingDirectoryPath.concat(ZIP_EXT));
  if (!stageDirectory.exists()) {
    logError(STAGE_DIR_NOT_FOUND);
    throw new Exception(STAGE_DIR_NOT_FOUND);
  }
  ZipUtil.pack(stageDirectory, zipPackage);
  logDebug(REMOVE_LOCAL_SETTINGS);
  ZipUtil.removeEntry(zipPackage, LOCAL_SETTINGS_FILE);
  logInfo(CREATE_ZIP_DONE + stagingDirectoryPath.concat(ZIP_EXT));
  return zipPackage;
}

30 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com