View Source SFTPClient.Operations.ReadFileChunk (SFTP Client v2.1.0)
A module that provides functions to read chunks of data from a file on an SFTP server.
Summary
Functions
Reads the given number of bytes (length) from the file referenced by handle.
If the file is read past eof, only the remaining bytes are read and returned.
If no bytes are read, :eof
is returned.
Reads the given number of bytes (length) from the file referenced by handle.
If the file is read past eof, only the remaining bytes are read and returned.
If no bytes are read, :eof
is returned. Raises when the operation fails.
Functions
@spec read_file_chunk(SFTPClient.Handle.t(), non_neg_integer()) :: {:ok, String.t()} | :eof | {:error, SFTPClient.error()}
Reads the given number of bytes (length) from the file referenced by handle.
If the file is read past eof, only the remaining bytes are read and returned.
If no bytes are read, :eof
is returned.
@spec read_file_chunk!(SFTPClient.Handle.t(), non_neg_integer()) :: String.t() | :eof | no_return()
Reads the given number of bytes (length) from the file referenced by handle.
If the file is read past eof, only the remaining bytes are read and returned.
If no bytes are read, :eof
is returned. Raises when the operation fails.