public class VirtualFileSystemFactory extends Object implements FileSystemFactory
Constructor and Description |
---|
VirtualFileSystemFactory() |
VirtualFileSystemFactory(Path defaultHomeDir) |
Modifier and Type | Method and Description |
---|---|
FileSystem |
createFileSystem(SessionContext session)
Create user specific file system.
|
Path |
getDefaultHomeDir() |
Path |
getUserHomeDir(SessionContext session) |
Path |
getUserHomeDir(String userName) |
void |
setDefaultHomeDir(Path defaultHomeDir) |
void |
setUserHomeDir(String userName,
Path userHomeDir) |
public VirtualFileSystemFactory()
public VirtualFileSystemFactory(Path defaultHomeDir)
public void setDefaultHomeDir(Path defaultHomeDir)
public Path getDefaultHomeDir()
public Path getUserHomeDir(SessionContext session) throws IOException
getUserHomeDir
in interface FileSystemFactory
session
- The session created for the usernull
if noneIOException
- If failed to resolve user's home directorypublic FileSystem createFileSystem(SessionContext session) throws IOException
FileSystemFactory
createFileSystem
in interface FileSystemFactory
session
- The session created for the userFileSystem
for the provided sessionIOException
- if the file system can not be createdCopyright © 2008–2024 The Apache Software Foundation. All rights reserved.