Node.Network.SftpClient
- Package
- purescript-ssh2-sftp-client
- Repository
- adamczykm/purescript-ssh2-sftp-client
#SftpSessionM Source
newtype SftpSessionM aThis 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 SftpSessionMApply SftpSessionMApplicative SftpSessionMBind SftpSessionMMonad SftpSessionM(Semigroup a) => Semigroup (SftpSessionM a)(Monoid a) => Monoid (SftpSessionM a)Alt SftpSessionMPlus SftpSessionMMonadEffect SftpSessionMMonadRec SftpSessionMMonadAff SftpSessionMMonadError Error SftpSessionMMonadThrow Error SftpSessionM
#runSftpSession Source
runSftpSession :: forall a. Config -> SftpSessionM a -> Aff aAssembles 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 UnitFunction creating an action executing SFTP command. Removes directory path from remote location.
#mkdir Source
mkdir :: { path :: String, recursive :: Boolean } -> SftpSessionM UnitFunction creating an action executing SFTP command. Creates a remote directory under the given path.
#rename Source
rename :: { from :: String, to :: String } -> SftpSessionM UnitFunction creating an action executing SFTP command. Renames remote location
#delete Source
delete :: String -> SftpSessionM UnitFunction creating an action executing SFTP command. Deletes file under the path given as a first argument.
#chmod Source
chmod :: { dest :: String, mode :: String } -> SftpSessionM UnitFunction 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 UnitFunction creating an action executing SFTP command. Downloads file from remote path using parallel reads.
#fastPut Source
fastPut :: { local :: String, remote :: String } -> SftpSessionM UnitFunction creating an action executing SFTP command. Uploads file under local path using parallel writes.