View Source SFTPClient.Operations.OpenFile (SFTP Client v2.1.0)
A module that provides functions to open a file on an SFTP server in order to read their contents.
Summary
Functions
Opens a file on the server and returns a handle, which can be used for reading or writing.
Opens a file on the server and returns a handle, which can be used for reading or writing, then runs the function and closes the handle when finished.
Opens a file on the server and returns a handle, which can be used for reading or writing. Raises when the operation fails.
Opens a file on the server and returns a handle, which can be used for reading or writing, then runs the function and closes the handle when finished. Raises when the operation fails.
Functions
@spec open_file(SFTPClient.Conn.t(), Path.t(), [SFTPClient.access_mode()]) :: {:ok, SFTPClient.Handle.t()} | {:error, SFTPClient.error()}
Opens a file on the server and returns a handle, which can be used for reading or writing.
@spec open_file( SFTPClient.Conn.t(), Path.t(), [SFTPClient.access_mode()], (SFTPClient.Handle.t() -> res) ) :: {:ok, res} | {:error, SFTPClient.error()} when res: var
Opens a file on the server and returns a handle, which can be used for reading or writing, then runs the function and closes the handle when finished.
@spec open_file!(SFTPClient.Conn.t(), Path.t(), [SFTPClient.access_mode()]) :: SFTPClient.Handle.t() | no_return()
Opens a file on the server and returns a handle, which can be used for reading or writing. Raises when the operation fails.
@spec open_file!( SFTPClient.Conn.t(), Path.t(), [SFTPClient.access_mode()], (SFTPClient.Handle.t() -> res) ) :: res | no_return() when res: var
Opens a file on the server and returns a handle, which can be used for reading or writing, then runs the function and closes the handle when finished. Raises when the operation fails.