📄 filestore.java
字号:
package com.sslexplorer.vfs.store.file;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import com.sslexplorer.security.SessionInfo;
import com.sslexplorer.vfs.NetworkPlace;
import com.sslexplorer.vfs.utils.URI;
import com.sslexplorer.vfs.utils.URI.MalformedURIException;
import com.sslexplorer.vfs.webdav.AbstractNetworkPlaceMount;
import com.sslexplorer.vfs.webdav.AbstractNetworkPlaceStore;
public class FileStore extends AbstractNetworkPlaceStore {
final static Log log = LogFactory.getLog(FileStore.class);
public FileStore() {
this("file");
}
public FileStore(String storeName) {
super(storeName, "UTF-8");
}
public String validateUserEnteredPath(String path) throws IllegalArgumentException {
try {
URI uri = new URI(path);
if (uri.getScheme() == null || uri.getScheme().equals("file") || (uri.getScheme().length() == 1 && uri.getScheme().charAt(0) >= 'a' && uri.getScheme().charAt(0) <= 'z') ) {
return "file";
}
} catch (MalformedURIException e) {
if (!path.startsWith("\\\\")) {
return "file";
}
}
throw new IllegalArgumentException();
}
protected AbstractNetworkPlaceMount createMount(NetworkPlace networkPlace, SessionInfo session) throws Exception {
return new FileMount(networkPlace, this);
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -