A
A
atumbochka2021-05-24 15:25:55
Node.js
atumbochka, 2021-05-24 15:25:55

How to copy a file to another Node.js folder?

There is a folder on the computer that contains the necessary file. I created a new folder: I need to copy the file from the first folder to the second, that is, it must not only end up in the second, but also remain in the first. Can this be done with fs? I found only writeFileSync, which just creates a file, nothing else could be found.
fs.mkdirSync(path.join(__dirname, "uploads", id))

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexey Yarkov, 2021-05-24
@atumbochka

That is, did not try to open the dock ?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question