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

public Class NativeFileSystemFactory

extends AbstractLoggingBean
implements FileSystemFactory
Class Inheritance
All Implemented Interfaces
org.apache.sshd.common.file.FileSystemFactory
Imports
java.io.IOException, java.nio.file.FileSystem, .FileSystems, .Files, .InvalidPathException, .NotDirectoryException, .Path, .Paths, org.apache.sshd.common.file.FileSystemFactory, org.apache.sshd.common.session.SessionContext, org.apache.sshd.common.util.GenericUtils, .OsUtils, .ValidateUtils, org.apache.sshd.common.util.logging.AbstractLoggingBean

Native file system factory. It uses the OS file system.
Author
Apache MINA Project

Field Summary

Modifier and TypeField and Description
private boolean
public static final String
public static final NativeFileSystemFactory
private String
Inherited from org.apache.sshd.common.util.logging.AbstractLoggingBean:
log

Constructor Summary

AccessConstructor and Description
public
public
NativeFileSystemFactory(boolean createHome)

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 String

Returns:

The root location where users home is to be created - never null/empty.
getUsersHomeDir
()

public boolean

Returns:

true if the file system will create the home directory if not available
isCreateHome
()

Should the home directories be created automatically

public void
setCreateHome(boolean
true if the file system should create the home directory automatically if not available
createHome
)

Set if the home directories be created automatically

public void
setUsersHomeDir(String
The root location where users home is to be created - never null/empty.
usersHomeDir
)

Set the root location where users home is to be created

Inherited from org.apache.sshd.common.util.logging.AbstractLoggingBean:
debugdebugdebugdebugdebugerrorerrorerrorerrorerrorgetSimplifiedLoggerinfoinfowarnwarnwarnwarnwarnwarnwarnwarn

Field Detail

createHomeback to summary
private boolean createHome
DEFAULT_USERS_HOMEback to summary
public static final String DEFAULT_USERS_HOME
INSTANCEback to summary
public static final NativeFileSystemFactory INSTANCE
usersHomeDirback to summary
private String usersHomeDir

Constructor Detail

NativeFileSystemFactoryback to summary
public NativeFileSystemFactory()
NativeFileSystemFactoryback to summary
public NativeFileSystemFactory(boolean createHome)

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
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

getUsersHomeDirback to summary
public String getUsersHomeDir()
Returns:String

The root location where users home is to be created - never null/empty.

isCreateHomeback to summary
public boolean isCreateHome()

Should the home directories be created automatically

Returns:boolean

true if the file system will create the home directory if not available

setCreateHomeback to summary
public void setCreateHome(boolean createHome)

Set if the home directories be created automatically

Parameters
createHome:boolean

true if the file system should create the home directory automatically if not available

See Also
getUsersHomeDir()
setUsersHomeDirback to summary
public void setUsersHomeDir(String usersHomeDir)

Set the root location where users home is to be created

Parameters
usersHomeDir:String

The root location where users home is to be created - never null/empty.

See Also
isCreateHome()