public interface UeditorStorage extends FileManager, Config
| 限定符和类型 | 方法和说明 |
|---|---|
void |
save(byte[] data,
String rootPath,
String savePath)
持久化文件信息
|
void |
save(File file,
String rootPath,
String path)
持久化文件信息
|
void |
setAllowFiles(String[] allowFiles)
设置需要过滤的文件后缀
|
default void |
setConfig(Map<String,Object> conf)
如需重写此方法必须调用
setConfig(Map),否则将导致以下属性无法取值:
rootPath
dir
count
allowFiles
|
void |
setCount(Integer count)
设置读取文件列表的文件数量
|
void |
setDir(String dir)
设置获取到哪个目录读取文件列表
|
void |
setRootPath(String rootPath)
设置文件保存根目录
|
com.baidu.ueditor.define.BaseState |
validFile(String savePath)
检测用于对于path是否拥有写权限
|
getAllowFiles, getPath, getState, getState, listFilecom.baidu.ueditor.define.BaseState validFile(String savePath)
savePath - 保存路径void save(File file, String rootPath, String path) throws IOException
file - 临时文件rootPath - 文件保存根目录path - 文件保存路径(相对于根目录)IOException - 文件处理出错void save(byte[] data,
String rootPath,
String savePath)
throws IOException
data - 文件数据rootPath - 文件保存根目录savePath - 文件保存目录(相对于根目录)IOException - 文件处理出错void setRootPath(String rootPath)
rootPath - 文件保存根目录void setDir(String dir)
dir - 目录void setCount(Integer count)
count - 文件数量void setAllowFiles(String[] allowFiles)
allowFiles - 后缀列表Copyright © 2020. All rights reserved.