Generic file handler for Erlang's ssh_sftpd server module.
This module implements the :ssh_sftpd_file_api behaviour and delegates
all storage operations to the configured backend.
Usage
This module is used internally by Sftpd.start_server/1. You typically
don't need to use it directly unless you're customizing the SSH daemon setup.
:ssh_sftpd.subsystem_spec(
file_handler: {Sftpd.FileHandler, %{backend: MyBackend, backend_state: state}}
)
Summary
Types
@type io_device() :: pid()
IO device handle (GenServer pid)
@type state() :: %{ :backend => module() | {:genserver, GenServer.server()} | {:genserver, GenServer.server(), keyword()}, :backend_state => term(), optional(:close_timeout) => timeout(), optional(:close_shutdown_grace) => non_neg_integer(), optional(:open_timeout) => timeout(), optional(:session) => map(), optional(:cwd) => charlist() }
File handler state containing backend module and its state