Package com.sshtools.common.files.direct
Class NioFileFactory.NioFileFactoryBuilder
java.lang.Object
com.sshtools.common.files.direct.NioFileFactory.NioFileFactoryBuilder
- Enclosing class:
- NioFileFactory
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionbuild()Build a newNioFileFactory.create()Create a newNioFileFactory.NioFileFactoryBuilder.Configure the current directory to be the directory to use as the home of this file factory, i.e.Configure the directory to use as the home of this file factory.Configure the directory to use as the home of this file factory.Remove the sandbox, so any files may be accessed outside of the configured home.withSandbox(boolean sandbox) Configure whether all file operations should be restricted to the default home directory or that provided.
-
Field Details
-
mapOwnership
public boolean mapOwnership
-
-
Method Details
-
create
Create a newNioFileFactory.NioFileFactoryBuilder.- Returns:
- build
-
withSandbox
Configure whether all file operations should be restricted to the default home directory or that provided. By default this istrue.- Parameters:
sandbox- sandbox- Returns:
- this for chaining
-
withMapOwnership
-
withoutSandbox
Remove the sandbox, so any files may be accessed outside of the configured home.- Returns:
- this for chaining
-
withHome
Configure the directory to use as the home of this file factory. If not provided, the current user's home directory will be used, i.e. that returned bySystem.getProperty("user.home");).- Parameters:
home-- Returns:
- this for chaining
-
withHome
Configure the directory to use as the home of this file factory. If not provided, the current user's home directory will be used, i.e. that returned bySystem.getProperty("user.home");).- Parameters:
home-- Returns:
- this for chaining
-
withCurrentDirectoryAsHome
Configure the current directory to be the directory to use as the home of this file factory, i.e. that returned bySystem.getProperty("user.dir");.- Returns:
- this for chaining
-
build
Build a newNioFileFactory.- Returns:
- factory
-