public class ResDir extends VirtualContainer
| 限定符和类型 | 方法和说明 |
|---|---|
ResDir |
add(Path res)
向目录中加入资源
加入的资源将会被复制到指定目录,与原有资源无关。
|
Path |
addWithPath(Path res)
向目录中加入资源
加入的资源将会被复制到指定目录,与原有资源无关
若存在同名文件,那么被加入文件将重命名,重名后的文件以返还值形式返回。
|
Path |
get(String name)
获取容器中的资源
|
addRaw, clean, close, exist, exit, flush, flushContainerByName, flushFileByName, getAbsLoc, getContainer, getContainerName, getContainerPath, getFile, getObj, getParent, getSysAbsPath, obtainContainer, putFile, putFileWithPath, putObj, setParentpublic ResDir(Path fullDir) throws IllegalArgumentException
public ResDir add(Path res) throws IOException
加入的资源将会被复制到指定目录,与原有资源无关。
若存在同名文件,那么被加入文件将重命名,若你需要获取重名后的文件信息请使用 VirtualContainer.putFileWithPath(Path)
res - 资源IOException - 文件复制过程中发生的异常public Path addWithPath(Path res) throws IOException
加入的资源将会被复制到指定目录,与原有资源无关
若存在同名文件,那么被加入文件将重命名,重名后的文件以返还值形式返回。
res - 资源IOException - 文件复制过程中发生的异常public Path get(String name) throws FileNotFoundException
name - 资源名称(包含后缀)FileNotFoundException - 文件不存在Copyright © 2023. All rights reserved.