SFTPClient.Operations.OpenDir (SFTP Client v1.4.6) View Source

A module that provides functions to open a directory on an SFTP server in order to list their contents.

Link to this section Summary

Functions

Opens a handle to a directory on the server. The handle can be used for reading directory contents.

Opens a handle to a directory on the server. The handle can be used for reading directory contents. Then runs the function and closes the handle when finished.

Opens a handle to a directory on the server. The handle can be used for reading directory contents. Raises when the operation fails.

Opens a handle to a directory on the server. The handle can be used for reading directory contents. Then runs the function and closes the handle when finished. Raises when the operation fails.

Link to this section Functions

Specs

open_dir(SFTPClient.Conn.t(), Path.t()) ::
  {:ok, SFTPClient.Handle.t()} | {:error, SFTPClient.error()}

Opens a handle to a directory on the server. The handle can be used for reading directory contents.

Link to this function

open_dir(conn, path, fun)

View Source

Specs

open_dir(SFTPClient.Conn.t(), Path.t(), (SFTPClient.Handle.t() -> res)) ::
  {:ok, res} | {:error, SFTPClient.error()}
when res: var

Opens a handle to a directory on the server. The handle can be used for reading directory contents. Then runs the function and closes the handle when finished.

Specs

Opens a handle to a directory on the server. The handle can be used for reading directory contents. Raises when the operation fails.

Link to this function

open_dir!(conn, path, fun)

View Source

Specs

open_dir!(SFTPClient.Conn.t(), Path.t(), (SFTPClient.Handle.t() -> res)) ::
  res | no_return()
when res: var

Opens a handle to a directory on the server. The handle can be used for reading directory contents. Then runs the function and closes the handle when finished. Raises when the operation fails.