folderitem.java
来自「这是linux下ssl vpn的实现程序」· Java 代码 · 共 40 行
JAVA
40 行
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 + =
减小字号Ctrl + -
显示快捷键?