Browse Source

支持列表、移动、删除、创建文件夹

main
zhouxin 4 years ago
parent
commit
4e6d717107
  1. 2
      src/main/java/com/github/zxbu/webdavteambition/client/AliYunDriverClient.java
  2. 57
      src/main/java/com/github/zxbu/webdavteambition/model/CreateFileRequest.java
  3. 48
      src/main/java/com/github/zxbu/webdavteambition/model/MoveRequest.java
  4. 20
      src/main/java/com/github/zxbu/webdavteambition/model/RemoveRequest.java
  5. 30
      src/main/java/com/github/zxbu/webdavteambition/model/RenameRequest.java
  6. 48
      src/main/java/com/github/zxbu/webdavteambition/model/UploadFinalRequest.java
  7. 125
      src/main/java/com/github/zxbu/webdavteambition/model/UploadPreRequest.java
  8. 9
      src/main/java/com/github/zxbu/webdavteambition/model/result/TFile.java
  9. 71
      src/main/java/com/github/zxbu/webdavteambition/model/result/UploadPreResult.java
  10. 156
      src/main/java/com/github/zxbu/webdavteambition/store/AliYunDriverClientService.java

2
src/main/java/com/github/zxbu/webdavteambition/client/AliYunDriverClient.java

@ -63,7 +63,7 @@ public class AliYunDriverClient { @@ -63,7 +63,7 @@ public class AliYunDriverClient {
.put(RequestBody.create(MediaType.parse(""), bytes, offset, byteCount))
.url(url).build();
try (Response response = okHttpClient.newCall(request).execute()){
LOGGER.info("post {}, code {}", url, response.code());
LOGGER.info("upload {}, code {}", url, response.code());
if (!response.isSuccessful()) {
LOGGER.error("请求失败,url={}, code={}, body={}", url, response.code(), response.body().string());
throw new WebdavException("请求失败:" + url);

57
src/main/java/com/github/zxbu/webdavteambition/model/CreateFileRequest.java

@ -1,29 +1,26 @@ @@ -1,29 +1,26 @@
package com.github.zxbu.webdavteambition.model;
public class CreateFileRequest {
private String ccpParentId;
private String checkNameMode = "refuse";
private String driveId;
private String check_name_mode = "refuse";
private String drive_id;
private String name;
private String orgId;
private String parentId;
private String spaceId;
private String parent_file_id;
private String type;
public String getCheckNameMode() {
return checkNameMode;
public String getCheck_name_mode() {
return check_name_mode;
}
public void setCheckNameMode(String checkNameMode) {
this.checkNameMode = checkNameMode;
public void setCheck_name_mode(String check_name_mode) {
this.check_name_mode = check_name_mode;
}
public String getDriveId() {
return driveId;
public String getDrive_id() {
return drive_id;
}
public void setDriveId(String driveId) {
this.driveId = driveId;
public void setDrive_id(String drive_id) {
this.drive_id = drive_id;
}
public String getName() {
@ -34,28 +31,12 @@ public class CreateFileRequest { @@ -34,28 +31,12 @@ public class CreateFileRequest {
this.name = name;
}
public String getOrgId() {
return orgId;
public String getParent_file_id() {
return parent_file_id;
}
public void setOrgId(String orgId) {
this.orgId = orgId;
}
public String getParentId() {
return parentId;
}
public void setParentId(String parentId) {
this.parentId = parentId;
}
public String getSpaceId() {
return spaceId;
}
public void setSpaceId(String spaceId) {
this.spaceId = spaceId;
public void setParent_file_id(String parent_file_id) {
this.parent_file_id = parent_file_id;
}
public String getType() {
@ -65,12 +46,4 @@ public class CreateFileRequest { @@ -65,12 +46,4 @@ public class CreateFileRequest {
public void setType(String type) {
this.type = type;
}
public String getCcpParentId() {
return ccpParentId;
}
public void setCcpParentId(String ccpParentId) {
this.ccpParentId = ccpParentId;
}
}

48
src/main/java/com/github/zxbu/webdavteambition/model/MoveRequest.java

@ -3,49 +3,31 @@ package com.github.zxbu.webdavteambition.model; @@ -3,49 +3,31 @@ package com.github.zxbu.webdavteambition.model;
import java.util.List;
public class MoveRequest {
private String driveId;
private String parentId;
private String orgId;
private boolean sameLevel = false;
private List<MoveRequestId> ids;
public String getDriveId() {
return driveId;
}
public void setDriveId(String driveId) {
this.driveId = driveId;
}
public String getParentId() {
return parentId;
}
public void setParentId(String parentId) {
this.parentId = parentId;
}
private String drive_id;
private String file_id;
private String to_parent_file_id;
public String getOrgId() {
return orgId;
public String getDrive_id() {
return drive_id;
}
public void setOrgId(String orgId) {
this.orgId = orgId;
public void setDrive_id(String drive_id) {
this.drive_id = drive_id;
}
public boolean isSameLevel() {
return sameLevel;
public String getFile_id() {
return file_id;
}
public void setSameLevel(boolean sameLevel) {
this.sameLevel = sameLevel;
public void setFile_id(String file_id) {
this.file_id = file_id;
}
public List<MoveRequestId> getIds() {
return ids;
public String getTo_parent_file_id() {
return to_parent_file_id;
}
public void setIds(List<MoveRequestId> ids) {
this.ids = ids;
public void setTo_parent_file_id(String to_parent_file_id) {
this.to_parent_file_id = to_parent_file_id;
}
}

20
src/main/java/com/github/zxbu/webdavteambition/model/RemoveRequest.java

@ -3,22 +3,22 @@ package com.github.zxbu.webdavteambition.model; @@ -3,22 +3,22 @@ package com.github.zxbu.webdavteambition.model;
import java.util.List;
public class RemoveRequest {
private String orgId;
private List<String> nodeIds;
private String drive_id;
private String file_id;
public List<String> getNodeIds() {
return nodeIds;
public String getDrive_id() {
return drive_id;
}
public void setNodeIds(List<String> nodeIds) {
this.nodeIds = nodeIds;
public void setDrive_id(String drive_id) {
this.drive_id = drive_id;
}
public String getOrgId() {
return orgId;
public String getFile_id() {
return file_id;
}
public void setOrgId(String orgId) {
this.orgId = orgId;
public void setFile_id(String file_id) {
this.file_id = file_id;
}
}

30
src/main/java/com/github/zxbu/webdavteambition/model/RenameRequest.java

@ -1,25 +1,25 @@ @@ -1,25 +1,25 @@
package com.github.zxbu.webdavteambition.model;
public class RenameRequest {
private String ccpFileId;
private String driveId;
private String check_name_mode = "refuse";
private String drive_id;
private String name;
private String orgId;
private String file_id;
public String getCcpFileId() {
return ccpFileId;
public String getCheck_name_mode() {
return check_name_mode;
}
public void setCcpFileId(String ccpFileId) {
this.ccpFileId = ccpFileId;
public void setCheck_name_mode(String check_name_mode) {
this.check_name_mode = check_name_mode;
}
public String getDriveId() {
return driveId;
public String getDrive_id() {
return drive_id;
}
public void setDriveId(String driveId) {
this.driveId = driveId;
public void setDrive_id(String drive_id) {
this.drive_id = drive_id;
}
public String getName() {
@ -30,11 +30,11 @@ public class RenameRequest { @@ -30,11 +30,11 @@ public class RenameRequest {
this.name = name;
}
public String getOrgId() {
return orgId;
public String getFile_id() {
return file_id;
}
public void setOrgId(String orgId) {
this.orgId = orgId;
public void setFile_id(String file_id) {
this.file_id = file_id;
}
}

48
src/main/java/com/github/zxbu/webdavteambition/model/UploadFinalRequest.java

@ -1,49 +1,31 @@ @@ -1,49 +1,31 @@
package com.github.zxbu.webdavteambition.model;
public class UploadFinalRequest {
private String ccpFileId;
private String driveId;
private String nodeId;
private String orgId;
private String uploadId;
private String drive_id;
private String file_id;
private String upload_id;
public String getDriveId() {
return driveId;
public String getDrive_id() {
return drive_id;
}
public void setDriveId(String driveId) {
this.driveId = driveId;
public void setDrive_id(String drive_id) {
this.drive_id = drive_id;
}
public String getNodeId() {
return nodeId;
public String getFile_id() {
return file_id;
}
public void setNodeId(String nodeId) {
this.nodeId = nodeId;
public void setFile_id(String file_id) {
this.file_id = file_id;
}
public String getOrgId() {
return orgId;
public String getUpload_id() {
return upload_id;
}
public void setOrgId(String orgId) {
this.orgId = orgId;
}
public String getUploadId() {
return uploadId;
}
public void setUploadId(String uploadId) {
this.uploadId = uploadId;
}
public String getCcpFileId() {
return ccpFileId;
}
public void setCcpFileId(String ccpFileId) {
this.ccpFileId = ccpFileId;
public void setUpload_id(String upload_id) {
this.upload_id = upload_id;
}
}

125
src/main/java/com/github/zxbu/webdavteambition/model/UploadPreRequest.java

@ -3,49 +3,124 @@ package com.github.zxbu.webdavteambition.model; @@ -3,49 +3,124 @@ package com.github.zxbu.webdavteambition.model;
import java.util.List;
public class UploadPreRequest {
private String checkNameMode = "autoRename";
private String orgId;
private String parentId;
private String spaceId;
private List<UploadPreInfo> infos;
private String check_name_mode = "refuse";
private String content_hash;
private String content_hash_name = "sha1";
private String drive_id;
private String name;
private String parent_file_id;
private String proof_code;
private String proof_version = "v1";
private Long size;
private List<PartInfo> part_info_list;
private String type = "file";
public String getCheckNameMode() {
return checkNameMode;
public String getCheck_name_mode() {
return check_name_mode;
}
public void setCheckNameMode(String checkNameMode) {
this.checkNameMode = checkNameMode;
public void setCheck_name_mode(String check_name_mode) {
this.check_name_mode = check_name_mode;
}
public String getOrgId() {
return orgId;
public String getContent_hash() {
return content_hash;
}
public void setOrgId(String orgId) {
this.orgId = orgId;
public void setContent_hash(String content_hash) {
this.content_hash = content_hash;
}
public String getParentId() {
return parentId;
public String getContent_hash_name() {
return content_hash_name;
}
public void setParentId(String parentId) {
this.parentId = parentId;
public void setContent_hash_name(String content_hash_name) {
this.content_hash_name = content_hash_name;
}
public String getSpaceId() {
return spaceId;
public String getDrive_id() {
return drive_id;
}
public void setSpaceId(String spaceId) {
this.spaceId = spaceId;
public void setDrive_id(String drive_id) {
this.drive_id = drive_id;
}
public List<UploadPreInfo> getInfos() {
return infos;
public String getName() {
return name;
}
public void setInfos(List<UploadPreInfo> infos) {
this.infos = infos;
public void setName(String name) {
this.name = name;
}
public String getParent_file_id() {
return parent_file_id;
}
public void setParent_file_id(String parent_file_id) {
this.parent_file_id = parent_file_id;
}
public String getProof_code() {
return proof_code;
}
public void setProof_code(String proof_code) {
this.proof_code = proof_code;
}
public String getProof_version() {
return proof_version;
}
public void setProof_version(String proof_version) {
this.proof_version = proof_version;
}
public Long getSize() {
return size;
}
public void setSize(Long size) {
this.size = size;
}
public List<PartInfo> getPart_info_list() {
return part_info_list;
}
public void setPart_info_list(List<PartInfo> part_info_list) {
this.part_info_list = part_info_list;
}
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
public static class PartInfo {
private Integer part_number;
private String upload_url;
public Integer getPart_number() {
return part_number;
}
public void setPart_number(Integer part_number) {
this.part_number = part_number;
}
public String getUpload_url() {
return upload_url;
}
public void setUpload_url(String upload_url) {
this.upload_url = upload_url;
}
}
}

9
src/main/java/com/github/zxbu/webdavteambition/model/result/TFile.java

@ -11,6 +11,7 @@ public class TFile { @@ -11,6 +11,7 @@ public class TFile {
private String file_id;
private Boolean hidden;
private String name;
private String file_name;
private String parent_file_id;
private String starred;
private String status;
@ -136,6 +137,14 @@ public class TFile { @@ -136,6 +137,14 @@ public class TFile {
this.download_url = download_url;
}
public String getFile_name() {
return file_name;
}
public void setFile_name(String file_name) {
this.file_name = file_name;
}
public void setUpdated_at(Date updated_at) {
this.updated_at = updated_at;
}

71
src/main/java/com/github/zxbu/webdavteambition/model/result/UploadPreResult.java

@ -1,60 +1,71 @@ @@ -1,60 +1,71 @@
package com.github.zxbu.webdavteambition.model.result;
import com.github.zxbu.webdavteambition.model.UploadPreRequest;
import java.util.List;
public class UploadPreResult {
private String ccpFileId;
private String nodeId;
private String name;
private String kind;
private String uploadId;
private List<String> uploadUrl;
private String file_id;
private String file_name;
private String location;
private Boolean rapid_upload;
private String type;
private String upload_id;
private List<UploadPreRequest.PartInfo> part_info_list;
public String getFile_id() {
return file_id;
}
public void setFile_id(String file_id) {
this.file_id = file_id;
}
public String getNodeId() {
return nodeId;
public String getFile_name() {
return file_name;
}
public void setNodeId(String nodeId) {
this.nodeId = nodeId;
public void setFile_name(String file_name) {
this.file_name = file_name;
}
public String getName() {
return name;
public String getLocation() {
return location;
}
public void setName(String name) {
this.name = name;
public void setLocation(String location) {
this.location = location;
}
public String getCcpFileId() {
return ccpFileId;
public Boolean getRapid_upload() {
return rapid_upload;
}
public void setCcpFileId(String ccpFileId) {
this.ccpFileId = ccpFileId;
public void setRapid_upload(Boolean rapid_upload) {
this.rapid_upload = rapid_upload;
}
public String getKind() {
return kind;
public String getType() {
return type;
}
public void setKind(String kind) {
this.kind = kind;
public void setType(String type) {
this.type = type;
}
public String getUploadId() {
return uploadId;
public String getUpload_id() {
return upload_id;
}
public void setUploadId(String uploadId) {
this.uploadId = uploadId;
public void setUpload_id(String upload_id) {
this.upload_id = upload_id;
}
public List<String> getUploadUrl() {
return uploadUrl;
public List<UploadPreRequest.PartInfo> getPart_info_list() {
return part_info_list;
}
public void setUploadUrl(List<String> uploadUrl) {
this.uploadUrl = uploadUrl;
public void setPart_info_list(List<UploadPreRequest.PartInfo> part_info_list) {
this.part_info_list = part_info_list;
}
}

156
src/main/java/com/github/zxbu/webdavteambition/store/AliYunDriverClientService.java

@ -96,71 +96,72 @@ public class AliYunDriverClientService { @@ -96,71 +96,72 @@ public class AliYunDriverClientService {
int chunkCount = (int) Math.ceil(((double) size) / chunkSize); // 进1法
UploadPreRequest uploadPreRequest = new UploadPreRequest();
// uploadPreRequest.setOrgId(client.getOrgId());
// uploadPreRequest.setParentId(parent.getNodeId());
// uploadPreRequest.setSpaceId(client.getSpaceId());
UploadPreInfo uploadPreInfo = new UploadPreInfo();
// uploadPreInfo.setCcpParentId(parent.getCcpFileId());
uploadPreInfo.setDriveId(client.getDriveId());
uploadPreInfo.setName(pathInfo.getName());
uploadPreInfo.setSize(size);
uploadPreInfo.setChunkCount(chunkCount);
uploadPreInfo.setType(FileType.file.name());
uploadPreRequest.setInfos(Collections.singletonList(uploadPreInfo));
uploadPreRequest.setContent_hash(UUID.randomUUID().toString());
uploadPreRequest.setDrive_id(client.getDriveId());
uploadPreRequest.setName(pathInfo.getName());
uploadPreRequest.setParent_file_id(parent.getFile_id());
uploadPreRequest.setSize((long) size);
List<UploadPreRequest.PartInfo> part_info_list = new ArrayList<>();
for (int i = 0; i < chunkCount; i++) {
UploadPreRequest.PartInfo partInfo = new UploadPreRequest.PartInfo();
partInfo.setPart_number(i + 1);
part_info_list.add(partInfo);
}
uploadPreRequest.setPart_info_list(part_info_list);
LOGGER.info("开始上传文件,文件名:{},总大小:{}, 文件块数量:{}", path, size, chunkCount);
String json = client.post("/pan/api/nodes/file", uploadPreRequest);
List<UploadPreResult> uploadPreResultList = JsonUtil.readValue(json, new TypeReference<List<UploadPreResult>>() {
});
UploadPreResult uploadPreResult = uploadPreResultList.get(0);
List<String> uploadUrl = uploadPreResult.getUploadUrl();
LOGGER.info("文件预处理成功,开始上传。文件名:{},上传URL数量:{}", path, uploadUrl.size());
byte[] buffer = new byte[chunkSize];
for (int i = 0; i < uploadUrl.size(); i++) {
String oneUploadUrl = uploadUrl.get(i);
try {
int read = IOUtils.read(inputStream, buffer, 0, buffer.length);
if (read == -1) {
return;
}
client.upload(oneUploadUrl, buffer, 0, read);
LOGGER.info("文件正在上传。文件名:{},当前进度:{}/{}", path, (i+1), uploadUrl.size());
String json = client.post("/file/create_with_proof", uploadPreRequest);
UploadPreResult uploadPreResult = JsonUtil.readValue(json, UploadPreResult.class);
List<UploadPreRequest.PartInfo> partInfoList = uploadPreResult.getPart_info_list();
if (partInfoList != null) {
LOGGER.info("文件预处理成功,开始上传。文件名:{},上传URL数量:{}", path, partInfoList.size());
} catch (IOException e) {
throw new WebdavException(e);
byte[] buffer = new byte[chunkSize];
for (int i = 0; i < partInfoList.size(); i++) {
UploadPreRequest.PartInfo partInfo = partInfoList.get(i);
try {
int read = IOUtils.read(inputStream, buffer, 0, buffer.length);
if (read == -1) {
return;
}
client.upload(partInfo.getUpload_url(), buffer, 0, read);
LOGGER.info("文件正在上传。文件名:{},当前进度:{}/{}", path, (i+1), partInfoList.size());
} catch (IOException e) {
throw new WebdavException(e);
}
}
}
UploadFinalRequest uploadFinalRequest = new UploadFinalRequest();
uploadFinalRequest.setCcpFileId(uploadPreResult.getCcpFileId());
uploadFinalRequest.setDriveId(client.getDriveId());
uploadFinalRequest.setNodeId(uploadPreResult.getNodeId());
// uploadFinalRequest.setOrgId(client.getOrgId());
uploadFinalRequest.setUploadId(uploadPreResult.getUploadId());
client.post("/pan/api/nodes/complete", uploadFinalRequest);
uploadFinalRequest.setFile_id(uploadPreResult.getFile_id());
uploadFinalRequest.setDrive_id(client.getDriveId());
uploadFinalRequest.setUpload_id(uploadPreResult.getUpload_id());
client.post("/file/complete", uploadFinalRequest);
LOGGER.info("文件上传成功。文件名:{}", path);
if (!uploadPreResult.getName().equals(pathInfo.getName())) {
LOGGER.info("上传文件名{}与原文件名{}不同,对文件进行重命名", uploadPreResult.getName(), pathInfo.getName());
TFile oldFile = getNodeIdByPath2(path);
// 如果旧文件存在,则先删除
if (oldFile != null) {
LOGGER.info("旧文件{}还存在,大小为{},进行删除操作,可前往网页版的回收站查看", path, oldFile.getSize());
remove(path);
try {
Thread.sleep(1500);
} catch (InterruptedException e) {
// no
}
}
RenameRequest renameRequest = new RenameRequest();
renameRequest.setCcpFileId(uploadPreResult.getCcpFileId());
renameRequest.setDriveId(client.getDriveId());
// renameRequest.setOrgId(client.getOrgId());
renameRequest.setName(pathInfo.getName());
client.put("/pan/api/nodes/" + uploadPreResult.getNodeId(), renameRequest);
}
// if (!uploadPreResult.getName().equals(pathInfo.getName())) {
// LOGGER.info("上传文件名{}与原文件名{}不同,对文件进行重命名", uploadPreResult.getName(), pathInfo.getName());
// TFile oldFile = getNodeIdByPath2(path);
// // 如果旧文件存在,则先删除
// if (oldFile != null) {
// LOGGER.info("旧文件{}还存在,大小为{},进行删除操作,可前往网页版的回收站查看", path, oldFile.getSize());
// remove(path);
// try {
// Thread.sleep(1500);
// } catch (InterruptedException e) {
// // no
// }
// }
// RenameRequest renameRequest = new RenameRequest();
// renameRequest.setDrive_id(client.getDriveId());
// renameRequest.setFile_id(oldFile.getFile_id());
// renameRequest.setName(pathInfo.getName());
// client.post("/file/update", renameRequest);
// }
clearCache();
}
@ -168,11 +169,10 @@ public class AliYunDriverClientService { @@ -168,11 +169,10 @@ public class AliYunDriverClientService {
sourcePath = normalizingPath(sourcePath);
TFile tFile = getTFileByPath(sourcePath);
RenameRequest renameRequest = new RenameRequest();
// renameRequest.setCcpFileId(tFile.getCcpFileId());
renameRequest.setDriveId(client.getDriveId());
// renameRequest.setOrgId(client.getOrgId());
renameRequest.setDrive_id(client.getDriveId());
renameRequest.setFile_id(tFile.getFile_id());
renameRequest.setName(newName);
// client.put("/pan/api/nodes/" + tFile.getNodeId(), renameRequest);
client.post("/file/update", renameRequest);
clearCache();
}
@ -183,15 +183,10 @@ public class AliYunDriverClientService { @@ -183,15 +183,10 @@ public class AliYunDriverClientService {
TFile sourceTFile = getTFileByPath(sourcePath);
TFile targetTFile = getTFileByPath(targetPath);
MoveRequest moveRequest = new MoveRequest();
// moveRequest.setOrgId(client.getOrgId());
moveRequest.setDriveId(client.getDriveId());
// moveRequest.setParentId(targetTFile.getNodeId());
MoveRequestId moveRequestId = new MoveRequestId();
// moveRequestId.setCcpFileId(sourceTFile.getCcpFileId());
// moveRequestId.setId(sourceTFile.getNodeId());
moveRequest.setIds(Collections.singletonList(moveRequestId));
client.post("/pan/api/nodes/move", moveRequest);
clearCache();
moveRequest.setDrive_id(client.getDriveId());
moveRequest.setFile_id(sourceTFile.getFile_id());
moveRequest.setTo_parent_file_id(targetTFile.getFile_id());
client.post("/file/move", moveRequest);
clearCache();
}
@ -202,9 +197,9 @@ public class AliYunDriverClientService { @@ -202,9 +197,9 @@ public class AliYunDriverClientService {
return;
}
RemoveRequest removeRequest = new RemoveRequest();
// removeRequest.setOrgId(client.getOrgId());
// removeRequest.setNodeIds(Collections.singletonList(tFile.getNodeId()));
client.post("/pan/api/nodes/archive", removeRequest);
removeRequest.setDrive_id(client.getDriveId());
removeRequest.setFile_id(tFile.getFile_id());
client.post("/recyclebin/trash", removeRequest);
clearCache();
}
@ -219,21 +214,16 @@ public class AliYunDriverClientService { @@ -219,21 +214,16 @@ public class AliYunDriverClientService {
}
CreateFileRequest createFileRequest = new CreateFileRequest();
// createFileRequest.setCcpParentId(parent.getCcpFileId());
createFileRequest.setDriveId(client.getDriveId());
createFileRequest.setDrive_id(client.getDriveId());
createFileRequest.setName(pathInfo.getName());
// createFileRequest.setOrgId(client.getOrgId());
// createFileRequest.setParentId(parent.getNodeId());
// createFileRequest.setSpaceId(client.getSpaceId());
createFileRequest.setParent_file_id(parent.getFile_id());
createFileRequest.setType(FileType.folder.name());
String json = client.post("/pan/api/nodes/folder", createFileRequest);
List<CreateFileResult> createFileResults = JsonUtil.readValue(json, new TypeReference<List<CreateFileResult>>() {
});
if (createFileResults.size() != 1) {
String json = client.post("/file/create_with_proof", createFileRequest);
TFile createFileResult = JsonUtil.readValue(json, TFile.class);
if (createFileResult.getFile_name() == null) {
LOGGER.error("创建目录{}失败: {}",path, json);
}
CreateFileResult createFileResult = createFileResults.get(0);
if (!createFileResult.getName().equals(pathInfo.getName())) {
if (!createFileResult.getFile_name().equals(pathInfo.getName())) {
LOGGER.info("创建目录{}与原值{}不同,重命名", createFileResult.getName(), pathInfo.getName());
rename(pathInfo.getParentPath() + "/" + createFileResult.getName(), pathInfo.getName());
clearCache();

Loading…
Cancel
Save