📄 ftpstore.java
字号:
package com.sslexplorer.vfs.store.ftp;
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.store.cifs.CIFSMount;
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 FTPStore extends AbstractNetworkPlaceStore {
final static Log log = LogFactory.getLog(FTPStore.class);
public FTPStore() {
super("ftp", "UTF-8");
}
public String validateUserEnteredPath(String path) throws IllegalArgumentException {
try {
URI uri = new URI(path);
if (uri.getScheme().equals("ftp") && !uri.getSchemeSpecificPart().startsWith("\\")){
return uri.getScheme();
}
}
catch (MalformedURIException e) {
}
throw new IllegalArgumentException();
}
protected AbstractNetworkPlaceMount createMount(NetworkPlace networkPlace, SessionInfo session) throws Exception {
return new CIFSMount(networkPlace, this);
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -