Class NoneFileSystemFactory
- java.lang.Object
-
- org.apache.sshd.common.file.nonefs.NoneFileSystemFactory
-
- All Implemented Interfaces:
FileSystemFactory
public class NoneFileSystemFactory extends java.lang.Object implements FileSystemFactory
Provides an "empty" file system that has no files/folders and throws exceptions on any attempt to access a file/folder on it
-
-
Field Summary
Fields Modifier and Type Field Description static NoneFileSystemFactoryINSTANCE
-
Constructor Summary
Constructors Constructor Description NoneFileSystemFactory()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.nio.file.FileSystemcreateFileSystem(SessionContext session)Create user specific file system.java.nio.file.PathgetUserHomeDir(SessionContext session)
-
-
-
Field Detail
-
INSTANCE
public static final NoneFileSystemFactory INSTANCE
-
-
Method Detail
-
getUserHomeDir
public java.nio.file.Path getUserHomeDir(SessionContext session) throws java.io.IOException
- Specified by:
getUserHomeDirin interfaceFileSystemFactory- Parameters:
session- The session created for the user- Returns:
- The recommended user home directory -
nullif none - Throws:
java.io.IOException- If failed to resolve user's home directory
-
createFileSystem
public java.nio.file.FileSystem createFileSystem(SessionContext session) throws java.io.IOException
Description copied from interface:FileSystemFactoryCreate user specific file system.- Specified by:
createFileSystemin interfaceFileSystemFactory- Parameters:
session- The session created for the user- Returns:
- The current
FileSystemfor the provided session - Throws:
java.io.IOException- if the file system can not be created
-
-