diff options
Diffstat (limited to 'src/main/java/com/gitblit/transport/ssh/DisabledFilesystemFactory.java')
-rw-r--r-- | src/main/java/com/gitblit/transport/ssh/DisabledFilesystemFactory.java | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/src/main/java/com/gitblit/transport/ssh/DisabledFilesystemFactory.java b/src/main/java/com/gitblit/transport/ssh/DisabledFilesystemFactory.java new file mode 100644 index 00000000..c0578f9d --- /dev/null +++ b/src/main/java/com/gitblit/transport/ssh/DisabledFilesystemFactory.java @@ -0,0 +1,26 @@ +package com.gitblit.transport.ssh; + +import java.io.IOException; + +import org.apache.sshd.common.Session; +import org.apache.sshd.common.file.FileSystemFactory; +import org.apache.sshd.common.file.FileSystemView; +import org.apache.sshd.common.file.SshFile; + +public class DisabledFilesystemFactory implements FileSystemFactory { + + @Override + public FileSystemView createFileSystemView(Session session) throws IOException { + return new FileSystemView() { + @Override + public SshFile getFile(SshFile baseDir, String file) { + return null; + } + + @Override + public SshFile getFile(String file) { + return null; + } + }; + } +} |