I have noticed an issue in the way FileInputStream is implemented
Currently it does not allow to open a file which is being written at the same time as the totalSize is initialized when the stream is constructed leading to an issue in getTotalLength, setPosition and other func.
My advice would be to not to store totalSize
call file.getSize(); in getTotalLength
and I don’t see the reason behind the lazy implementation of setPosition either.
I would call directly juce_fileSetPosition so you can spot using this function an eventual out of bound seek. Currently it always returns true.
For an output stream it makes sense but for an InputStream I don’t understand in which cases I wouldn’t consider it as an error.
If not why do you have a return value to setPosition ?