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 FileSystemcreateFileSystem(SessionContext session)Create user specific file system.PathgetDefaultHomeDir()PathgetUserHomeDir(String userName)PathgetUserHomeDir(SessionContext session)voidsetDefaultHomeDir(Path defaultHomeDir)voidsetUserHomeDir(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()
-
getUserHomeDir
public Path getUserHomeDir(SessionContext session) throws IOException
- Specified by:
getUserHomeDirin interfaceFileSystemFactory- Parameters:
session- The session created for the user- Returns:
- The recommended user home directory -
nullif none - Throws:
IOException- If failed to resolve user's home directory
-
createFileSystem
public FileSystem createFileSystem(SessionContext session) throws IOException
Description copied from interface:FileSystemFactoryCreate user specific file system.- Specified by:
createFileSystemin interfaceFileSystemFactory- Parameters:
session- The session created for the user- Returns:
- The current
FileSystemfor the provided session - Throws:
IOException- if the file system can not be created
-
-