Lots of documentation improvements for asyncdispatch.

Ref #1487.
This commit is contained in:
Dominik Picheta 2014-09-12 22:54:02 +01:00
commit 6f155af802
7 changed files with 183 additions and 26 deletions

View file

@ -6,6 +6,24 @@
# distribution, for details about the copyright.
#
## This module implement an asynchronous FTP client.
##
## Examples
## --------
##
## .. code-block::nim
##
## var ftp = newAsyncFtpClient("example.com", user = "test", pass = "test")
## proc main(ftp: AsyncFtpClient) {.async.} =
## await ftp.connect()
## echo await ftp.pwd()
## echo await ftp.listDirs()
## await ftp.store("payload.jpg", "payload.jpg")
## await ftp.retrFile("payload.jpg", "payload2.jpg")
## echo("Finished")
##
## waitFor main(ftp)
import asyncdispatch, asyncnet, strutils, parseutils, os, times
from ftpclient import FtpBaseObj, ReplyError, FtpEvent