LightMind commented on issue #364: URL: https://github.com/apache/cordova-plugin-file/issues/364#issuecomment-947474745
@raphinesse Thank you so much, I really appreciate it :) I am also a little bit worried about changing the behaviour of `FileWriter` to always use chunks, because it can potentially give problems with partial writes. Writing to a file feels to me like something that should be atomic, if possible. This makes me unsure about if or how to continue https://github.com/apache/cordova-plugin-file/pull/461 Would it be reasonable to provide a `ChunkedFileWriter` ( And maybe a `ChunkedFileReader` )? It could implement the chunked writing behaviour on top of `FileWriter`. Something like ``` fileEntry.createWriter(async (fileWriter) => { var chunkedWriter = new ChunkedFileWriter(fileWriter) chunkedWriter.setChunkSize(2 ** 15) chunkedWriter.onwriteend = function() ... ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
