K
K
KnightForce2017-04-03 15:04:30
Node.js
KnightForce, 2017-04-03 15:04:30

Node.js How to delete a file after the stream is destroyed?

I write from req to a file.
Under certain conditions, I call destroy()on the file stream, but some of the data has already been written. How to delete a file?
Only the file descriptor is known.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
Dmitry Belyaev, 2017-04-03
@bingo347

https://nodejs.org/dist/latest-v7.x/docs/api/fs.ht...
https://www.cyberciti.biz/tips/delete-remove-files...

K
KnightForce, 2017-04-03
@KnightForce

I got the file name through the url, and used it in the end, I wanted it through the descriptor, but as it is.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question