From cd414791801807bed39557eae81bc0e83620b015 Mon Sep 17 00:00:00 2001 From: pyloor Date: Wed, 21 Sep 2016 23:49:40 +0200 Subject: [PATCH] adding removeFile proc to asyncftpclient --- lib/pure/asyncftpclient.nim | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/pure/asyncftpclient.nim b/lib/pure/asyncftpclient.nim index 037d55e1d1..c8bdbe3579 100644 --- a/lib/pure/asyncftpclient.nim +++ b/lib/pure/asyncftpclient.nim @@ -354,6 +354,10 @@ proc store*(ftp: AsyncFtpClient, file, dest: string, await doUpload(ftp, destFile, onProgressChanged) +proc removeFile*(ftp: AsyncFtpClient, filename: string) {.async.} = + ## Delete a file ``filename`` on the remote FTP server + assertReply(await ftp.send("DELE " & filename), "250") + proc newAsyncFtpClient*(address: string, port = Port(21), user, pass = ""): AsyncFtpClient = ## Creates a new ``AsyncFtpClient`` object.