0

我正在以压缩的形式导出我的数据。我需要验证我的产品版本,即导出文件的版本。我必须验证文件版本。

java中有什么方法可以在文件详细信息中写入/读取该文件的版本,如下图所示?

在此处输入图像描述

try {
    Path inputFilePath = Paths.get(exportFilePath);
    Path outputFilePath = Paths.get(outputDirPath,
    String.format("%s.%s", inputFilePath.getFileName(), EXPORT_EXTENSION));
    fileZipper.zipIt(inputFilePath, outputFilePath);
    log.info("Zipping completed.");
} catch (IOException e) {
    log.error("Got error whlie zipping file. ", e);
}

也请建议我实现这一目标的另一种方法。

4

0 回答 0