0

I'm currently working on a small offline HTML app. I want to know if there is a way to list the files from a directory on an HTML page only by using Javascript. I've heard it is not possible due to some security risks. What do you guys think about? If using Javascript is indeed not possible, then what would be the easiest way to do that? I know there would be some Nodejs involved. Or perhaps jquery. Some code would be also helpful.

Thanks in advance!

Evgenij Reznik
  • 17,916
  • 39
  • 104
  • 181

1 Answers1

0

Base Javascript is executed in the browser. By design browsers don't have access to your operating system. If you really want to use Javascript you need to use Node.js. This tutorial may help you out. But I think your best bet is going to be to Google around and learn Node. I think it's going to be difficult find anyone on here to give you code to do what you need. But I may be wrong.

axecopfire
  • 512
  • 5
  • 16