public interface IFileStorage
| Modifier and Type | Method and Description |
|---|---|
void |
close()
关闭连接
|
String |
combinePaths(String firstFilePath,
String... moreFilePath)
路径连接
|
boolean |
connect()
连接
|
IFileset |
createDirectory(String path,
String name)
在指定目录下创建文件目录
|
boolean |
deleteFile(String filePath)
删除文件或文件目录
|
boolean |
fileExist(String filePath)
文件是否存在
|
IFileset |
getFile(String filePath)
获取指定路径文件或文件目录
|
IFileset |
getParentFile(String filePath)
获取指定路径的父文件
|
String |
getPassword()
获取密码
|
String |
getSeparator()
文件目录分隔符
|
String |
getStorageUrl()
获取文件存储连接地址
|
String |
getType()
存储类型
|
String |
getUserName()
获取用户名
|
List<IFileset> |
listFile(String filePath,
boolean recursion)
指定路径下的文件和文件目录列表
|
InputStream |
openFileStream(String filePath)
打开文件流
|
IFileset |
upload(InputStream srcInputStream,
String destFile,
boolean overwrite)
上传文件流
|
IFileset |
upload(String srcLocalFile,
String destFile,
boolean overwrite)
上传本地文件
|
String getStorageUrl()
String getUserName()
String getPassword()
String getType()
String getSeparator()
boolean connect()
void close()
List<IFileset> listFile(String filePath, boolean recursion)
filePath - recursion - boolean fileExist(String filePath)
filePath - boolean deleteFile(String filePath)
filePath - IFileset createDirectory(String path, String name)
path - name - String combinePaths(String firstFilePath, String... moreFilePath)
firstFilePath - moreFilePath - IFileset upload(String srcLocalFile, String destFile, boolean overwrite)
srcLocalFile - 本地源文件路径destFile - 目标文件路径overwrite - 是否覆盖已有文件IFileset upload(InputStream srcInputStream, String destFile, boolean overwrite)
srcInputStream - 源文件流destFile - 目标文件路径overwrite - 是否覆盖已有文件InputStream openFileStream(String filePath)
filePath - Copyright © 2025. All rights reserved.