public class NativeFileSystemFactory extends AbstractLoggingBean implements FileSystemFactory
| Modifier and Type | Field and Description |
|---|---|
static String |
DEFAULT_USERS_HOME |
static NativeFileSystemFactory |
INSTANCE |
log| Constructor and Description |
|---|
NativeFileSystemFactory() |
NativeFileSystemFactory(boolean createHome) |
| Modifier and Type | Method and Description |
|---|---|
FileSystem |
createFileSystem(SessionContext session)
Create user specific file system.
|
Path |
getUserHomeDir(SessionContext session) |
String |
getUsersHomeDir() |
boolean |
isCreateHome()
Should the home directories be created automatically
|
void |
setCreateHome(boolean createHome)
Set if the home directories be created automatically
|
void |
setUsersHomeDir(String usersHomeDir)
Set the root location where users home is to be created
|
getSimplifiedLoggerpublic static final String DEFAULT_USERS_HOME
public static final NativeFileSystemFactory INSTANCE
public NativeFileSystemFactory()
public NativeFileSystemFactory(boolean createHome)
public String getUsersHomeDir()
null/empty.public void setUsersHomeDir(String usersHomeDir)
usersHomeDir - The root location where users home is to be created - never null/empty.isCreateHome()public boolean isCreateHome()
true if the file system will create the home directory if not availablepublic void setCreateHome(boolean createHome)
createHome - true if the file system should create the home directory automatically if not availablegetUsersHomeDir()public Path getUserHomeDir(SessionContext session) throws IOException
getUserHomeDir in interface FileSystemFactorysession - The session created for the usernull if noneIOException - If failed to resolve user's home directorypublic FileSystem createFileSystem(SessionContext session) throws IOException
FileSystemFactorycreateFileSystem in interface FileSystemFactorysession - The session created for the userFileSystem for the provided sessionIOException - if the file system can not be createdCopyright © 2018–2020 The Apache Software Foundation. All rights reserved.