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

A module that provides functions to rename files and directories on an SFTP server.

Summary

Functions

Renames a file named old_path and gives it the name specified by new_path.

Renames a file named old_path and gives it the name specified by new_path. Raises when the operation fails.

Functions

Link to this function

rename(conn, old_path, new_path)

View Source
@spec rename(SFTPClient.Conn.t(), Path.t(), Path.t()) ::
  :ok | {:error, SFTPClient.error()}

Renames a file named old_path and gives it the name specified by new_path.

Link to this function

rename!(conn, old_path, new_path)

View Source
@spec rename!(SFTPClient.Conn.t(), Path.t(), Path.t()) :: :ok | no_return()

Renames a file named old_path and gives it the name specified by new_path. Raises when the operation fails.