-4

How I can write simple text (e.g. "Hello world") to file? I must use JavaScript and code must work on Mac OS.

Quentin
  • 800,325
  • 104
  • 1,079
  • 1,205

1 Answers1

1

Security limitations don't allow javascript to access the local file system through the browser.
But you can use the Node.js interpreter to run javascript "server side".
If this is the case, your code should look something like this.

Community
  • 1
  • 1
EyalAr
  • 3,030
  • 1
  • 20
  • 27
  • Mac OS X Version 10.6.8. The problem: MacOS has a software-as-UIAutomation so he takes .app and .js. When just runs only it start the emulator and runs the script ... So for example use the script I take the data and I want to write to a file. Seems simple ... but I do not know how. – Pavel Ilyinsky Jun 22 '12 at 12:04