文件系统上的抽象层和Java中的jar / zip [英] Abstraction layer over the file system and jar/zip in Java

查看:186
本文介绍了文件系统上的抽象层和Java中的jar / zip的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有一个Java库,它提供了文件系统和jar / zip的一个抽象层。我检查了 apache常用vfs ,但不支持列出目录内容和文件重命名等操作假设有一些代码,它使用 java.io.File 和它的好友来为Jar / Zip。

访问文件系统中的文件,如果这些文件在Jar / Zip中,我需要使其工作。我想找到一个API,它非常类似于 java.io.File ,以使代码重构更容易。

解决方案

我还没有使用它,但是你正在寻找 / oracle / javase / 7 / docs / technotes / guides /io/fsp/zipfilesystemprovider.html\">

Is there a Java library, which provides an abstraction layer over the file system and jar/zip. I checked apache common vfs but it does not support such operations as listing directory content and file rename for Jar/Zip.

Suppose there is some code, which uses java.io.File and its friends to access files in the file system, and I need to make it work if these files are in Jar/Zip. I would like to find an API, which is very similar to java.io.File, to make the code refactoring easier.

解决方案

I haven't used it yet, but are you looking for the Zip File System Provider introduced in Java 7?

这篇关于文件系统上的抽象层和Java中的jar / zip的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆