Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Find the contents of a directory

Tags:

javascript

Is it possible to get the contents of a directory with javascript?

like image 405
Ben Shelock Avatar asked Jun 17 '10 16:06

Ben Shelock


2 Answers

Not really because of security reasons. You are trying to access client's file system !!

Note: There is FSO (File System Object) but to my knowledge it only works in IE.

Useful Resources:

http://www.c-point.com/JavaScript/articles/file_access_with_JavaScript.htm
http://4umi.com/web/javascript/fileread.php

like image 62
Sarfraz Avatar answered Oct 03 '22 15:10

Sarfraz


No, not with JavaScript that runs within a browser sandbox.

like image 31
Justin Ethier Avatar answered Oct 03 '22 15:10

Justin Ethier