raphinesse commented on issue #364: URL: https://github.com/apache/cordova-plugin-file/issues/364#issuecomment-962593326
@LightMind First off: sorry for the late reply. > Writing to a file feels to me like something that should be atomic, if possible. Agreed. Maybe a `ChunkedFileWriter` would delete the whole file if a chunk write fails? > Would it be reasonable to provide a `ChunkedFileWriter` ( And maybe a `ChunkedFileReader` )? It could implement the chunked writing behaviour on top of `FileWriter`. If we want a chunked writer in this plugin, I think that would be the way to go. Another interesting approach can be seen in [capacitor-blob-writer](https://github.com/diachedelic/capacitor-blob-writer#how-it-works). It streams the data out of the WebView by means of network requests. Seems more reasonable than pushing everything over the bridge in base64 form. Moreover, this approach seems to grant great performance. A pity that we actually need a local server running on the device for that. -- 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]
