Node.Network.SftpClient
- Package
- purescript-ssh2-sftp-client
- Repository
- adamczykm/purescript-ssh2-sftp-client
#SftpSessionM Source
newtype SftpSessionM a
This type represents a SFTP session. It hides unsafe internals of underlying JS package. Each command provided by this library will return a SftpSessionM action Running SftpSessionM handles both connecting and disconnecting from server even in case of exception.
Instances
Functor SftpSessionM
Apply SftpSessionM
Applicative SftpSessionM
Bind SftpSessionM
Monad SftpSessionM
(Semigroup a) => Semigroup (SftpSessionM a)
(Monoid a) => Monoid (SftpSessionM a)
Alt SftpSessionM
Plus SftpSessionM
MonadEffect SftpSessionM
MonadRec SftpSessionM
MonadAff SftpSessionM
MonadError Error SftpSessionM
MonadThrow Error SftpSessionM
#runSftpSession Source
runSftpSession :: forall a. Config -> SftpSessionM a -> Aff a
Assembles SftpSessionM into a single Aff. Under the hood it makes sure that underlying connection is closed even in the presence of an exception.
#list Source
list :: String -> SftpSessionM (Array FileInfo)
Function creating an action executing SFTP command. List directory given as first argument. E.g. list "/"j
#rmdir Source
rmdir :: { path :: String, recursive :: Boolean } -> SftpSessionM Unit
Function creating an action executing SFTP command. Removes directory path from remote location.
#mkdir Source
mkdir :: { path :: String, recursive :: Boolean } -> SftpSessionM Unit
Function creating an action executing SFTP command. Creates a remote directory under the given path.
#rename Source
rename :: { from :: String, to :: String } -> SftpSessionM Unit
Function creating an action executing SFTP command. Renames remote location
#delete Source
delete :: String -> SftpSessionM Unit
Function creating an action executing SFTP command. Deletes file under the path given as a first argument.
#chmod Source
chmod :: { dest :: String, mode :: String } -> SftpSessionM Unit
Function creating an action executing SFTP command. Changing access mode of remote file. E.g. chmod { dest: "/file.md", mode: "775" }
#fastGet Source
fastGet :: { local :: String, remote :: String } -> SftpSessionM Unit
Function creating an action executing SFTP command. Downloads file from remote path using parallel reads.
#fastPut Source
fastPut :: { local :: String, remote :: String } -> SftpSessionM Unit
Function creating an action executing SFTP command. Uploads file under local path using parallel writes.