本文整理了Java中net.lingala.zip4j.util.Zip4jUtil.getFilesInDirectoryRec()
方法的一些代码示例,展示了Zip4jUtil.getFilesInDirectoryRec()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Zip4jUtil.getFilesInDirectoryRec()
方法的具体详情如下:
包路径:net.lingala.zip4j.util.Zip4jUtil
类名称:Zip4jUtil
方法名:getFilesInDirectoryRec
暂无
代码示例来源:origin: net.lingala.zip4j/zip4j
public static ArrayList getFilesInDirectoryRec(File path,
boolean readHiddenFiles) throws ZipException {
if (path == null) {
throw new ZipException("input path is null, cannot read files in the directory");
}
ArrayList result = new ArrayList();
File[] filesAndDirs = path.listFiles();
List filesDirs = Arrays.asList(filesAndDirs);
if (!path.canRead()) {
return result;
}
for(int i = 0; i < filesDirs.size(); i++) {
File file = (File)filesDirs.get(i);
if (file.isHidden() && !readHiddenFiles) {
return result;
}
result.add(file);
if (file.isDirectory()) {
List deeperList = getFilesInDirectoryRec(file, readHiddenFiles);
result.addAll(deeperList);
}
}
return result;
}
代码示例来源:origin: com.github.axet/zip4j
public static ArrayList getFilesInDirectoryRec(NativeStorage path,
boolean readHiddenFiles) throws ZipException {
if (path == null) {
throw new ZipException("input path is null, cannot read files in the directory");
}
ArrayList result = new ArrayList();
NativeStorage[] filesAndDirs = path.listFiles();
List filesDirs = Arrays.asList(filesAndDirs);
if (!path.canRead()) {
return result;
}
for(int i = 0; i < filesDirs.size(); i++) {
NativeStorage file = (NativeStorage)filesDirs.get(i);
if (file.isHidden() && !readHiddenFiles) {
return result;
}
result.add(file);
if (file.isDirectory()) {
List deeperList = getFilesInDirectoryRec(file, readHiddenFiles);
result.addAll(deeperList);
}
}
return result;
}
代码示例来源:origin: net.lingala.zip4j/zip4j
ArrayList fileList = Zip4jUtil.getFilesInDirectoryRec(file, parameters.isReadHiddenFiles());
代码示例来源:origin: com.github.axet/zip4j
ArrayList fileList = Zip4jUtil.getFilesInDirectoryRec(file, parameters.isReadHiddenFiles());
内容来源于网络,如有侵权,请联系作者删除!