Ask questionsFile.writeSync(buf) - does not write buffer more than 16384 bytes
When a buffer is writting to a file synchronously, a buffer larger than 16384 is truncated without warning and is not written to the file!
deno 0.32.0 v8 8.1.108 typescript 3.7.2
Code Example: `const buf_size = 40960 //4096 - standard value //16384 - max allowed value !!! const buf = new Uint8Array(buf_size) buf.fill(0x31)
const fn = './deno_file_write_bug.txt' const f = Deno.openSync(fn, 'w') f.writeSync(buf) f.close()
const fi = Deno.lstatSync(fn) console.log(fi.len === buf_size ? true : fi.len)`
Answer questions ry
@balajahe Maybe it could be more explicit but doesn't "Resolves with the number of bytes written" suggest that it might not write the complete buffer? What would you have it say?