SFTP Client v1.4.1 SFTPClient.Operations.OpenFile View Source
A module that provides functions to open a file on an SFTP server in order to read their contents.
Link to this section 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.
Link to this section Functions
open_file(conn, path, modes)
View Sourceopen_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.
open_file(conn, path, modes, fun)
View Sourceopen_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.
open_file!(conn, path, modes)
View Sourceopen_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.
open_file!(conn, path, modes, fun)
View Sourceopen_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.