public interface FilePool
限定符和类型 | 方法和说明 |
---|---|
void |
clear()
清空文件池
|
java.io.File |
createDir()
在池中创建一个临时目录
|
java.io.File |
createFile(java.lang.String suffix)
在池中创建一个文件
|
long |
current() |
java.io.File |
getDir(long fId)
获取一个临时目录,如果临时目录不存在,返回null
|
java.io.File |
getFile(long fId,
java.lang.String suffix)
获取一个文件,如果文件不存在,返回null
|
long |
getFileId(java.io.File f)
获取一个文件在池中的 ID。
|
boolean |
hasDir(long fId)
判断文件池中是否存在一个临时目录
|
boolean |
hasFile(long fId,
java.lang.String suffix)
判断文件池中是否存在一个文件
|
java.io.File |
removeDir(long fId)
从池中删除一个临时目录,如果文件不存在,返回null
|
java.io.File |
removeFile(long fId,
java.lang.String suffix)
从池中删除一个文件,如果文件不存在,返回null
|
java.io.File |
returnDir(long fId)
获取一个临时目录,如果临时目录不存在,创建它
|
java.io.File |
returnFile(long fId,
java.lang.String suffix)
获取一个文件,如果文件不存在,创建它
|
long current()
boolean hasFile(long fId, java.lang.String suffix)
fId
- 文件的 IDsuffix
- 文件后缀名java.io.File removeFile(long fId, java.lang.String suffix)
fId
- 文件IDsuffix
- 文件后缀名java.io.File createFile(java.lang.String suffix)
suffix
- 文件的后缀java.io.IOException
long getFileId(java.io.File f)
f
- 文件java.io.File getFile(long fId, java.lang.String suffix)
fId
- 文件IDsuffix
- 文件后缀名java.io.File returnFile(long fId, java.lang.String suffix)
fId
- suffix
- boolean hasDir(long fId)
fId
- 临时目录的 IDjava.io.File removeDir(long fId)
fId
- 临时目录IDjava.io.File createDir()
java.io.IOException
java.io.File getDir(long fId)
fId
- 临时目录IDjava.io.File returnDir(long fId)
fId
- void clear()
java.io.IOException