📄 folderitem.java
字号:
package com.sslexplorer.vfs;
import java.util.Calendar;
import com.sslexplorer.vfs.webdav.DAVOutputStream;
import com.sslexplorer.vfs.webdav.DAVUtilities;
public class FolderItem extends FileSystemItem {
private String folderPath;
private String storeName;
public FolderItem(String fileName, String storeName, String folderPath, Calendar dateModified, String fileType, boolean selected, int idx) {
super(fileName, dateModified, fileType, selected, 0, idx);
this.folderPath = folderPath;
this.storeName = storeName;
}
public String getFolderPath() {
return folderPath;
}
public void setFolderPath(String folderPath) {
this.folderPath = folderPath;
}
public String onClick(String path) {
if (getFileName().equals("../")){
return "/fileSystem.do?actionTarget=list&startRow=0&path=" + DAVUtilities.encodePath(DAVUtilities.dirname(this.folderPath));
}
else{
return "/fileSystem.do?actionTarget=list&startRow=0&path=" + DAVUtilities.encodePath(DAVUtilities.concatenatePaths(folderPath, getFileName()));
}
}
public String getWebFolderPath() {
return "/fs/" + folderPath + "/" + getFileName();
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -