Class FSSHelper
java.lang.Object
cool.scx.app.x.fss.FSSHelper
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic PathcheckPhysicalFile(FSSObject fssObject) 检查物理文件是否存在 存在则返回物理文件 不存在则抛出异常static FSSObjectcopyFSSObject(String fileName, FSSObject oldFSSObject) static FSSObjectcreateFSSObjectByFileInfo(String fileName, Long fileSize, String fileHash) 根据文件信息 创建 FSSObject 实例 规则如下 fssObjectID (文件 id) : 随机字符串 filePath (文件物理文件存储路径) : 年份(以上传时间为标准)/月份(以上传时间为标准)/天(以上传时间为标准)/文件MD5/文件真实名称 其他字段和字面意义相同static IntegergetLastUploadChunk(Path uploadConfigFile, Integer chunkLength) static PathgetPhysicalFilePath(FSSObject fssObject) 获取物理文件路径static net.coobird.thumbnailator.geometry.PositionsgetPositions(String type) static PathgetUploadTempPath(String fileHash) static voidupdateLastUploadChunk(Path uploadConfigFile, Integer nowChunkIndex, Integer chunkLength) 更新最后一次文件上传的区块
-
Constructor Details
-
FSSHelper
public FSSHelper()
-
-
Method Details
-
getPositions
-
getPhysicalFilePath
-
checkPhysicalFile
-
getUploadTempPath
-
copyFSSObject
-
createFSSObjectByFileInfo
根据文件信息 创建 FSSObject 实例 规则如下 fssObjectID (文件 id) : 随机字符串 filePath (文件物理文件存储路径) : 年份(以上传时间为标准)/月份(以上传时间为标准)/天(以上传时间为标准)/文件MD5/文件真实名称 其他字段和字面意义相同 -
getLastUploadChunk
public static Integer getLastUploadChunk(Path uploadConfigFile, Integer chunkLength) throws IOException - Throws:
IOException
-
updateLastUploadChunk
public static void updateLastUploadChunk(Path uploadConfigFile, Integer nowChunkIndex, Integer chunkLength) throws IOException 更新最后一次文件上传的区块- Parameters:
uploadConfigFile- aFileobject.nowChunkIndex- aIntegerobject.chunkLength- aIntegerobject.- Throws:
IOException- e
-