Class NativeFileSystemFactory
- java.lang.Object
-
- org.apache.sshd.common.util.logging.AbstractLoggingBean
-
- org.apache.sshd.common.file.nativefs.NativeFileSystemFactory
-
- All Implemented Interfaces:
FileSystemFactory
public class NativeFileSystemFactory extends AbstractLoggingBean implements FileSystemFactory
Native file system factory. It uses the OS file system.- Author:
- Apache MINA Project
-
-
Field Summary
Fields Modifier and Type Field Description static String
DEFAULT_USERS_HOME
static NativeFileSystemFactory
INSTANCE
-
Fields inherited from class org.apache.sshd.common.util.logging.AbstractLoggingBean
log
-
-
Constructor Summary
Constructors Constructor Description NativeFileSystemFactory()
NativeFileSystemFactory(boolean createHome)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description FileSystem
createFileSystem(Session session)
Create user specific file system.String
getUsersHomeDir()
boolean
isCreateHome()
Should the home directories be created automaticallyvoid
setCreateHome(boolean createHome)
Set if the home directories be created automaticallyvoid
setUsersHomeDir(String usersHomeDir)
Set the root location where users home is to be created-
Methods inherited from class org.apache.sshd.common.util.logging.AbstractLoggingBean
getSimplifiedLogger
-
-
-
-
Field Detail
-
DEFAULT_USERS_HOME
public static final String DEFAULT_USERS_HOME
- See Also:
- Constant Field Values
-
INSTANCE
public static final NativeFileSystemFactory INSTANCE
-
-
Method Detail
-
getUsersHomeDir
public String getUsersHomeDir()
- Returns:
- The root location where users home is to be created - never
null
/empty.
-
setUsersHomeDir
public void setUsersHomeDir(String usersHomeDir)
Set the root location where users home is to be created- Parameters:
usersHomeDir
- The root location where users home is to be created - nevernull
/empty.- See Also:
isCreateHome()
-
isCreateHome
public boolean isCreateHome()
Should the home directories be created automatically- Returns:
true
if the file system will create the home directory if not available
-
setCreateHome
public void setCreateHome(boolean createHome)
Set if the home directories be created automatically- Parameters:
createHome
-true
if the file system should create the home directory automatically if not available- See Also:
getUsersHomeDir()
-
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
-
-