Class VirtualFileSystemFactory
java.lang.Object
org.apache.sshd.common.file.virtualfs.VirtualFileSystemFactory
- All Implemented Interfaces:
FileSystemFactory
SSHd file system factory to reduce the visibility to a physical folder.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateFileSystem
(SessionContext session) Create user specific file system.getUserHomeDir
(String userName) getUserHomeDir
(SessionContext session) void
setDefaultHomeDir
(Path defaultHomeDir) void
setUserHomeDir
(String userName, Path userHomeDir)
-
Field Details
-
defaultHomeDir
-
homeDirs
-
-
Constructor Details
-
VirtualFileSystemFactory
public VirtualFileSystemFactory() -
VirtualFileSystemFactory
-
-
Method Details
-
setDefaultHomeDir
-
getDefaultHomeDir
-
setUserHomeDir
-
getUserHomeDir
-
getUserHomeDir
- Specified by:
getUserHomeDir
in interfaceFileSystemFactory
- Parameters:
session
- The session created for the user- Returns:
- The recommended user home directory -
null
if none - Throws:
IOException
- If failed to resolve user's home directory
-
createFileSystem
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 file system can not be created
-