View Source SFTPClient.Operations.OpenDir (SFTP Client v2.0.1)

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

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.

Functions

@spec 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
@spec 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.

@spec open_dir!(SFTPClient.Conn.t(), Path.t()) :: SFTPClient.Handle.t() | no_return()

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
@spec 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.