Consider these file structures:
Parent
├── folder 1
│ └── sub1
│ ├── child a
│ └── sub2
│ ├── btn.xls
│ └── sample.docxs
└── folder 2
├── child 1
└── child 2
├── mri.pdf
├── lake2.jpg
└── exp_folder
├── exp1.png
└── exp2.png
How can i read this file structures using plain javascript? I am not sure if there is a javascript equivalent of php's scandir()
function.