Closed alexrintt closed 1 year ago
One thing that I think would definitely be worth having is the ability to append an existing file, and to access a file as a seekable stream without having to copy it all into RAM.
@EternityForest Do you have any examples showing how it (seekable stream) works? Would like to see it working.
Also, any further links will be helpful, I'm not aware of this kind of API.
@EternityForest Is https://github.com/alexrintt/shared-storage/issues/91 this what you need for a stream based API? I'm not aware of seekable streams in dart, so this is the best you can get I guess.
I would also love stream support. The stream does not need to be seekable. It is just so I can copy a file to public memory without having to read it fully into memory when using documentFile.writeToFileAsBytes
. Ideally, the documentFile.writeToFile
would also accept a stream.
For getting the stream, it seems you can follow this recipe (using virtual files): https://developer.android.com/training/data-storage/shared/documents-files#open-virtual-file I have not tried it yet though..
Then wrap it with a dart Stream adapter
To see details, refer to #56.
The following features will be available on the next major release: