html - JavaScript: print working directory, list files in subdirectory ...
function listTree (root) { print (root); if (root.isDirectory ()) { root.getFiles ().forEach (function (file) { listTree (file); }); } } As mentioned above, this would go in the server side code since that's where the files are actually stored. (Your users' computers shouldn't be able to access all the files on the server, right? :) ) Share