Accessing a folder to list/play clips one by one

2019-07-26 17:30发布

问题:

I just want to know if there is an object to access a folder path which includes list of clips in javascript.

Which object I should use to list clips in a folder? Actually I can't use all objects, only provided for Ecmascript.

回答1:

JavaScript/Ecmascript cannot see the local filesystem. If it could then we'd have web pages sniffing all of our files without our consent.



回答2:

JavaScript doesn't get to see the user's file system. That'd be a huge security problem for everyone everywhere. If you're referring to the server's file system then you probably already have a better language like php that can list the directory contents and dynamically generate the JS before it is sent to the browser.