i'm opening writable stream device (e.g: /dev/disk2
) fs.createwritestream()
. assuming don't know device size in advance, how correctly detect if device can't receive more data (e.g: device doesn't have more space)?
if simulate such scenario, eio
error emitted stream:
error: eio: i/o error, write @ error (native) errno: -5, code: 'eio', syscall: 'write', type: 'write'
but eio
generic, , can thrown in other situations well.
i'm inspecting properties of stream object once error thrown there doesn't seem exist flag use determine this.
Comments
Post a Comment