Quote:
Originally Posted by BenCollver2
In rhino it would go something like this.
var fo = new java.io.File(path);
var files = fo.listFiles();
Or if you want to get fancy, you can use CommonJS ala narwhal or node.
|
Thanks for your reply. Is the code like this?
function loadfiles()
{
var path=document.location;
path=turnPath(path);
var fo = new java.io.File(path);
var files = fo.listFiles();
var filesEnum=new Enumerator(files);
for(;!filesEnum.atEnd();filesEnum.moveNext())
{
var filename=filesEnum.item().Name;
}
}