D
D
Danil Samusev2021-08-02 19:12:51
Node.js
Danil Samusev, 2021-08-02 19:12:51

How to get files and folders in a specific directory?

There is a directory, let's say "upload", it has a lot of all sorts of files, and they are always different, they have different names, and so on. So, I need to write the name of the folders into one array, and the full path to the files that are in these same folders into another array. I tried to find such a function in the "fs" library, but in the end I did not find it.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Simkav, 2021-08-02
@Simkav

readDir
stat
isFile
isDir
_

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question