Class NioFileFactory.NioFileFactoryBuilder

java.lang.Object
com.sshtools.common.files.direct.NioFileFactory.NioFileFactoryBuilder
Enclosing class:
NioFileFactory

public static final class NioFileFactory.NioFileFactoryBuilder extends Object
  • Field Details

    • mapOwnership

      public boolean mapOwnership
  • Method Details

    • create

      public static NioFileFactory.NioFileFactoryBuilder create()
      Returns:
      build
    • withSandbox

      public NioFileFactory.NioFileFactoryBuilder withSandbox(boolean sandbox)
      Configure whether all file operations should be restricted to the default home directory or that provided. By default this is true.
      Parameters:
      sandbox - sandbox
      Returns:
      this for chaining
    • withMapOwnership

      public NioFileFactory.NioFileFactoryBuilder withMapOwnership()
    • withoutSandbox

      public NioFileFactory.NioFileFactoryBuilder 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 by System.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 by System.getProperty("user.home");).
      Parameters:
      home -
      Returns:
      this for chaining
    • withCurrentDirectoryAsHome

      public NioFileFactory.NioFileFactoryBuilder withCurrentDirectoryAsHome()
      Configure the current directory to be the directory to use as the home of this file factory, i.e. that returned by System.getProperty("user.dir");.
      Returns:
      this for chaining
    • build

      public NioFileFactory build()
      Build a new NioFileFactory.
      Returns:
      factory