sftp_ex v0.1.0 SFTP.Service
Provides methods for connecting to a server through SFTP, and downloading files from the server.
Summary
Functions
Closes an open SFTP channel given a channel_pid and file handle
Creates an SFTP connection
Similar to IO.each_binstream this returns a tuple with the data and the file handle if data is read from the server. If it reaches the end of the file then {:halt, handle} is returned where handle is the file handle
Opens a file given a channel PID and path. {:ok, handle} if successful, {:error, reason} otherwise
Downloads a remote path {:ok, data} if successful, {:error, reason} if unsuccessful
Writes a file to a remote path given a file, path, and open channel
Writes data to a open file using the channel PID
Functions
Creates an SFTP connection
Available Options see http://erlang.org/doc/man/ssh.html#connect-3
Similar to IO.each_binstream this returns a tuple with the data and the file handle if data is read from the server. If it reaches the end of the file then {:halt, handle} is returned where handle is the file handle
Opens a file given a channel PID and path. {:ok, handle} if successful, {:error, reason} otherwise
Downloads a remote path {:ok, data} if successful, {:error, reason} if unsuccessful
Writes a file to a remote path given a file, path, and open channel