sftp_ex v0.2.0 SFTP.ManagementService

Provides methods for managing files through an SFTP connection

Summary

Functions

Lists files in a directory

Removes a directory and all files within the directory

Removes a file Types: connection = Connection file = string()

Renames a file or directory, Returns {:ok, handle}, or {:error, reason}

Functions

list_files(connection, remote_path)

Lists files in a directory

make_directory(connection, remote_path)
remove_directory(connection, directory)

Removes a directory and all files within the directory

#Deletes a directory specified by Name. The directory must be empty before it can be successfully deleted.

Types: connection = Connection directory = string()

Returns :ok, or {:error, reason}

remove_file(connection, file)

Removes a file Types: connection = Connection file = string()

Returns :ok, or {:error, reason}

rename(connection, old_name, new_name)

Renames a file or directory, Returns {:ok, handle}, or {:error, reason}

truncate_file(connection, remote_path, bytes)