SFTP Client v1.4.1 SFTPClient.Operations.ReadFileChunk View Source
A module that provides functions to read chunks of data from a file on an SFTP server.
Link to this section 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.
Link to this section Functions
read_file_chunk(handle, length)
View Sourceread_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.
read_file_chunk!(handle, length)
View Sourceread_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.