-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use chunked streams to read files #39
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Richard, just a thing for the future to you think about it.
When I hash files, i create a
fs.createReadStream(path)
and do it on chunks, using.on('data', (data) => hash.update(data))
the thing is that on('error') i can handle it properly.
The most common error is while reading the file, the file gets deleted or changed.
So this is a common thing to do, handle the EBUSY when it happens
Originally posted by @leopucci in #32 (comment)
The text was updated successfully, but these errors were encountered: