This commit is contained in:
konsumlamm 2021-08-31 08:14:05 +02:00 • committed by GitHub
commit f02de25ca1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -202,10 +202,11 @@ proc readBuffer*(f: AsyncFile, buf: pointer, size: int): Future[int] =
proc read*(f: AsyncFile, size: int): Future[string] =
## Read `size` bytes from the specified file asynchronously starting at
## the current position of the file pointer.
## the current position of the file pointer. `size` should be greater than zero.
##
## If the file pointer is past the end of the file then an empty string is
## returned.
assert size > 0
var retFuture = newFuture[string]("asyncfile.read")
when defined(windows) or defined(nimdoc):