Top Description Fields Constructors Methods
org.apache.sshd.common.file.virtualfs

public Class VirtualFileSystemFactory

extends Object
implements FileSystemFactory
Class Inheritance
All Implemented Interfaces
org.apache.sshd.common.file.FileSystemFactory
Imports
java.io.IOException, java.nio.file.FileSystem, .InvalidPathException, .Path, java.util.Collections, .Map, .Objects, java.util.concurrent.ConcurrentHashMap, org.apache.sshd.common.file.FileSystemFactory, org.apache.sshd.common.file.root.RootedFileSystemProvider, org.apache.sshd.common.session.SessionContext, org.apache.sshd.common.util.ValidateUtils

SSHd file system factory to reduce the visibility to a physical folder.

Field Summary

Modifier and TypeField and Description
private Path
private final Map<String, Path>

Constructor Summary

AccessConstructor and Description
public
public

Method Summary

Modifier and TypeMethod and Description
public FileSystem
createFileSystem(SessionContext
The session created for the user
session
)

Implements org.apache.sshd.common.file.FileSystemFactory.createFileSystem.

Create user specific file system.

public Path
public Path
public Path
public void
setDefaultHomeDir(Path defaultHomeDir)

public void
setUserHomeDir(String userName, Path userHomeDir)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

defaultHomeDirback to summary
private Path defaultHomeDir
homeDirsback to summary
private final Map<String, Path> homeDirs

Constructor Detail

VirtualFileSystemFactoryback to summary
public VirtualFileSystemFactory()
VirtualFileSystemFactoryback to summary
public VirtualFileSystemFactory(Path defaultHomeDir)

Method Detail

createFileSystemback to summary
public FileSystem createFileSystem(SessionContext session) throws IOException

Implements org.apache.sshd.common.file.FileSystemFactory.createFileSystem.

Doc from org.apache.sshd.common.file.FileSystemFactory.createFileSystem.

Create user specific file system.

Parameters
session:SessionContext

The session created for the user

Returns:FileSystem

The current FileSystem for the provided session

Annotations
@Override
Exceptions
IOException:
if the file system can not be created
getDefaultHomeDirback to summary
public Path getDefaultHomeDir()
getUserHomeDirback to summary
public Path getUserHomeDir(String userName)
getUserHomeDirback to summary
public Path getUserHomeDir(SessionContext session) throws IOException

Implements org.apache.sshd.common.file.FileSystemFactory.getUserHomeDir.

Parameters
session:SessionContext

Doc from org.apache.sshd.common.file.FileSystemFactory.getUserHomeDir.

The session created for the user

Returns:Path

Doc from org.apache.sshd.common.file.FileSystemFactory.getUserHomeDir.

The recommended user home directory - null if none

Annotations
@Override
Exceptions
IOException:

Doc from org.apache.sshd.common.file.FileSystemFactory.getUserHomeDir.

If failed to resolve user's home directory

setDefaultHomeDirback to summary
public void setDefaultHomeDir(Path defaultHomeDir)
setUserHomeDirback to summary
public void setUserHomeDir(String userName, Path userHomeDir)