Javascript File i/o

Thursday May 25th, 2000

Pete Collins from Alphanumerica and Mozilla developers have created a Javascript interface for doing file i/o in Mozilla, which will allow new Mozilla components like Alphanumerica's Crash Recovery system to function properly.

Patterned after the PHP filesystem functions, simple functions such as file read/write and directory create are supported. The code has not yet made it into the nightly build, but they expect it will get in soon.

Note from AN: There seems to be a misconception about Javascript File I/O being a security risk. It is important to clarify that this project is not opening any security holes in Mozilla. There is a difference between Javascript on the Internet and Javascript inside the application. Javascript is used inside Mozilla to create the functionality for the application. This is in contrast to any Javascript downloaded from the Internet that is used for functionality only inside a Web page. This project does not grant any access to Javascript found on the Internet. For more information about how Javascript is used inside Mozilla read more about XPCOM and XPConnect.

#39 Re: Re: My thoughts on this so far....

by petejc <>

Friday May 26th, 2000 7:48 AM

You are replying to this message

Exactly Ben. This is for mozilla application programmers only. As more or less an organized convenience to the current existing methodologies of doing file I/O from application script.

I just read the project web page posted by Alphanumerica just now. I see now where the fear of God has stemmed from.

"This interface allows even casual programmers full access to local file handling routines."

This actually scared me as well after reading it. When you are programming any client application, the programmer *always* has full access to everything.

This statement is misleading in the sense that it made it appear that we all of a sudden opened up file I/O in Mozilla. The wording will be changed today.