I\'m stumped and feeling stupid. I\'ve tried every search combination I can think of to figure this out. It seems simple, but being new to javascript I\'m not seeing anythin
Ok, I'm feeling less stupid now. I got it working using Jscript and the jsc.exe included with the .NET Framework on Windows:
> var myFileSystemObj = new ActiveXObject("Scripting.FileSystemObject");
>
> var pathToFileDir = ".";
> var myFolder = myFileSystemObj.GetFolder(pathToFileDir);
>
> var myEnum = new
> Enumerator(myFolder.Files);
>
> for
> (;!myEnum.atEnd();myEnum.moveNext()) {
> print(myEnum.item()) }
which gives me the file names in a directory nice and easy on the ol' XP.
So I guess the question should be is there a similar facility for doing this on Linux?
I'm trying to recompile the Spidermonkey engine with the JS_HAS_FILE_OBJECT=1
flag, but it errors out, so I have some reading & work ahead of me to get this working, but I think I'm heading in the right direction. Any hints or suggestions on a different way to do this with javascript would be welcome (beyond "use N", where N = python, perl, java, etc...).