io.write returns number of written bytes on error

This commit is contained in:
Roberto Ierusalimschy committed 2025-04-03 11:32:49 -03:00
1 parent 93e347b519
commit 3f4f28010a
4 files changed
+65 -7

No files matched your search

+3
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.
}