io.write returns number of written bytes on error

This commit is contained in:
Roberto Ierusalimschy
2025-04-03 11:32:49 -03:00
parent 93e347b519
commit 3f4f28010a
4 changed files with 65 additions and 7 deletions

View File

@@ -8699,6 +8699,9 @@ Writes the value of each of its arguments to @id{file}.
The arguments must be strings or numbers.
In case of success, this function returns @id{file}.
Otherwise, it returns four values:
@fail, the error message, the error code,
and the number of bytes it was able to write.
}