write_file @doc, @spec and implementation do not match
schnittchen opened this issue · comments
@doc """
Reads a file from the server, and returns the data as String.
"""
@spec write_file(Conn.t(), Path.t(), String.t() | [String.t()]) ::
:ok | {:error, SFTPClient.error()}
def write_file(%Conn{} = conn, path, data) when is_binary(data) do
write_file(conn, path, [data])
end
- returns a string according to
@doc
- returns
:ok
or{:error, _}
according to@spec
data
is_binary according to implementationdata
can be String.t or [String.t] according to@spec
Hello, thanks for creating this issue! The docs are wrong. Seems to be a copy-and-paste error (these are the docs for one of the read_file functions). I'm going to fix this asap. :)
fixed in 8004b42