problem reading and writing files in subdirectories from javascript
Hello
I would like to read and write text files from javascript. I would like the text files to be located in a subdirectory, but even if I specify a proper file path, the text file writes in the same directory as the javascript file.
Do I miss something?
my test function:
function test()
{
var f = new File('/testdir/testfile.txt','write','TEXT');
f.writestring('test');
f.close();
}
// the file 'testfile.txt' appears in the same directory as the js file, not in the testdir subdirectory.
Thanks
I found this which should make it:
https://cycling74.com/forums/problem-accessing-relative-files-in-file-class/