| 构造器和说明 |
|---|
FileResource(File file,
boolean readonly,
String rootPath) |
| 限定符和类型 | 方法和说明 |
|---|---|
boolean |
delete()
删除
|
List<Resource> |
dirs()
目录
|
boolean |
exists()
判断是否存在
|
List<Resource> |
files(String suffix)
遍历文件
|
String |
getAbsolutePath()
获取所在位置
|
String |
getFilePath()
获取文件路径
|
Resource |
getResource(String name)
获取子资源
|
boolean |
isDirectory()
判断是否是目录
|
boolean |
mkdir()
创建目录
|
String |
name()
获取资源名
|
Resource |
parent()
父级资源
|
void |
processExport(ZipOutputStream zos,
String path,
Resource directory,
List<Resource> resources,
List<String> excludes)
处理导出
|
byte[] |
read()
读取
|
boolean |
readonly()
判断是否是只读
|
boolean |
renameTo(Resource resource)
重命名
|
List<Resource> |
resources()
获取子资源集合
|
String |
toString() |
boolean |
write(byte[] bytes)
写入
|
boolean |
write(String content)
写入
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitexport, getDirectory, readAll, separatorpublic boolean readonly()
Resourcepublic boolean isDirectory()
ResourceisDirectory 在接口中 Resourcepublic Resource getResource(String name)
ResourcegetResource 在接口中 Resourcename - 文件名称public boolean write(byte[] bytes)
Resourcepublic String getAbsolutePath()
ResourcegetAbsolutePath 在接口中 Resourcepublic void processExport(ZipOutputStream zos, String path, Resource directory, List<Resource> resources, List<String> excludes) throws IOException
ResourceprocessExport 在接口中 Resourcezos - zip 输出流path - 路径directory - 目录资源对象resources - 资源集合excludes - 排除的目录IOException - 处理过程中抛出的异常public String getFilePath()
ResourcegetFilePath 在接口中 ResourceCopyright © 2020–2021. All rights reserved.