Class VirtualFileSystemFactory
- java.lang.Object
-
- org.apache.sshd.common.file.virtualfs.VirtualFileSystemFactory
-
- All Implemented Interfaces:
FileSystemFactory
public class VirtualFileSystemFactory extends Object implements FileSystemFactory
SSHd file system factory to reduce the visibility to a physical folder.
-
-
Constructor Summary
Constructors Constructor Description VirtualFileSystemFactory()
VirtualFileSystemFactory(Path defaultHomeDir)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected Path
computeRootDir(Session session)
FileSystem
createFileSystem(Session session)
Create user specific file system.Path
getDefaultHomeDir()
Path
getUserHomeDir(String userName)
void
setDefaultHomeDir(Path defaultHomeDir)
void
setUserHomeDir(String userName, Path userHomeDir)
-
-
-
Constructor Detail
-
VirtualFileSystemFactory
public VirtualFileSystemFactory()
-
VirtualFileSystemFactory
public VirtualFileSystemFactory(Path defaultHomeDir)
-
-
Method Detail
-
setDefaultHomeDir
public void setDefaultHomeDir(Path defaultHomeDir)
-
getDefaultHomeDir
public Path getDefaultHomeDir()
-
createFileSystem
public FileSystem createFileSystem(Session session) throws IOException
Description copied from interface:FileSystemFactory
Create user specific file system.- Specified by:
createFileSystem
in interfaceFileSystemFactory
- Parameters:
session
- The session created for the user- Returns:
- The current
FileSystem
for the provided session - Throws:
IOException
- if the filesystem can not be created
-
computeRootDir
protected Path computeRootDir(Session session) throws IOException
- Throws:
IOException
-
-