gecko-dev/js/src/sh
val4%cornell.edu a9de497de7 Netscape licence added 1999-01-05 01:08:45 +00:00
..
README.html Extended shell. Previously was part of the ns tree. See README.html for 1999-01-04 23:45:08 +00:00
jssh.c Netscape licence added 1999-01-05 01:08:45 +00:00
jssh.dsp Extended shell. Previously was part of the ns tree. See README.html for 1999-01-04 23:45:08 +00:00
jssh.dsw Extended shell. Previously was part of the ns tree. See README.html for 1999-01-04 23:45:08 +00:00

README.html

<HTML>
<HEAD>
   <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
   <META NAME="Author" CONTENT="Vladimir Livshits">
   <META NAME="GENERATOR" CONTENT="Mozilla/4.05 [en]C-NSCP  (WinNT; U) [Netscape]">
   <TITLE>Specification for the JavaScript shell</TITLE>
</HEAD>
<BODY>

<CENTER>
<H3>
Object hierarchy for JS Shell:</H3></CENTER>
&nbsp;
<CENTER><TABLE BORDER=3 COLS=3 WIDTH="650" >
<TR ALIGN=CENTER VALIGN=TOP>
<TD ALIGN=CENTER VALIGN=TOP HEIGHT="100%">
<TABLE BORDER=0 WIDTH="100%" >
<TR>
<TD BGCOLOR="#C0C0C0"><B>&nbsp;System&nbsp;</B></TD>
</TR>

<TR>
<TD>
<CENTER><B><FONT COLOR="#FF0000">Methods</FONT></B></CENTER>

<UL>
<LI>
<B><TT>chdir</TT></B></LI>

<LI>
<B><TT>pipe</TT></B></LI>

<LI>
<B><TT>script</TT></B></LI>

<LI>
<B><TT>exit</TT></B></LI>

<LI>
<B><TT>system</TT></B></LI>

<LI>
<B><TT>gc</TT></B></LI>

<LI>
<TT><B>call </B>(executes an external script)</TT></LI>

<LI>
<TT><B>use</B> (make methods of the script you pass available. I.e. if
you say <B>use('Foo','Bar')</B>, you can now call Foo.f() and Bar.f().
Foo.eval() will evaluate all the code)</TT></LI>
</UL>

<CENTER><B><FONT COLOR="#FF0000">Properties</FONT></B></CENTER>

<UL>
<LI>
<B><TT><FONT COLOR="#330033">stdout</FONT></TT></B></LI>

<LI>
<B><TT><FONT COLOR="#330033">stdin</FONT></TT></B></LI>

<LI>
<B><TT><FONT COLOR="#330033">stderr&nbsp;</FONT></TT></B></LI>

<LI>
<TT><FONT COLOR="#330033"><B>platform </B>('PC', 'UNIX', 'MAC')</FONT></TT></LI>

<LI>
<TT><FONT COLOR="#330033"><B>ARGV </B>(arguments passed to the script)</FONT></TT></LI>
</UL>
<B><FONT COLOR="#330033">Notes: <TT>pipe</TT> </FONT></B><FONT COLOR="#330033">works
like backticks in Perl; <B><TT>script</TT></B> works the other way around,
that is, you give it an array and it feeds the array to the executable
you specify (somewhat similar to the script command on <TT>UNIX</TT>).</FONT></TD>
</TR>
</TABLE>
&nbsp;</TD>

<TD>
<TABLE BORDER=0 COLS=1 WIDTH="100%" >
<TR>
<TD BGCOLOR="#C0C0C0"><B>Environment</B></TD>
</TR>

<TR>
<TD HEIGHT="100%">
<CENTER><B><FONT COLOR="#FF0000">Properties</FONT></B></CENTER>


<P><FONT COLOR="#330033">All environment variables become properties of
<B><TT>Environment</TT></B>. Assigning to them actually changes the environment.</FONT></TD>
</TR>
</TABLE>
&nbsp;</TD>

<TD>
<TABLE BORDER=0 COLS=1 WIDTH="100%" >
<TR>
<TD BGCOLOR="#C0C0C0"><B>File</B></TD>
</TR>

<TR>
<TD>
<TABLE BORDER=0 COLS=2 WIDTH="100%" >
<TR>
<TD>
<CENTER><B><FONT COLOR="#FF0000">Properties</FONT></B></CENTER>

<CENTER>&nbsp;</CENTER>

<LI>
<B><TT>currentDir</TT></B></LI>

<LI>
<B><TT>length&nbsp;</TT></B></LI>

<LI>
<B><TT>parent&nbsp;</TT></B></LI>

<LI>
<B><TT>path&nbsp;</TT></B></LI>

<LI>
<B><TT>name&nbsp;</TT></B></LI>

<LI>
<B><TT>isDirectory</TT></B></LI>

<LI>
<B><TT>isFile&nbsp;</TT></B></LI>

<LI>
<B><TT>exists&nbsp;</TT></B></LI>

<LI>
<B><TT>canRead&nbsp;</TT></B></LI>

<LI>
<B><TT>canWrite&nbsp;</TT></B></LI>

<LI>
<B><TT>opened&nbsp;</TT></B></LI>

<LI>
<B><TT>type&nbsp;</TT></B></LI>

<LI>
<B><TT>mode&nbsp;</TT></B></LI>

<LI>
<B><TT>creationTime</TT></B></LI>

<LI>
<B><TT>lastModified</TT></B></LI>

<LI>
<B><TT>size&nbsp;</TT></B></LI>

<LI>
<B><TT>randomAccess</TT></B></LI>

<LI>
<B><TT>position</TT></B></LI>
</TD>

<TD VALIGN=TOP>
<CENTER><B><FONT COLOR="#FF0000">Methods</FONT></B></CENTER>

<CENTER>&nbsp;</CENTER>

<LI>
<B><TT>open&nbsp;</TT></B></LI>

<LI>
<B><TT>close&nbsp;</TT></B></LI>

<LI>
<B><TT>remove&nbsp;</TT></B></LI>

<LI>
<B><TT>copyTo&nbsp;</TT></B></LI>

<LI>
<B><TT>renameTo</TT></B></LI>

<LI>
<B><TT>flush&nbsp;</TT></B></LI>

<LI>
<B><TT>skip&nbsp;</TT></B></LI>

<LI>
<B><TT>read&nbsp;</TT></B></LI>

<LI>
<B><TT>readln&nbsp;</TT></B></LI>

<LI>
<B><TT>readAll&nbsp;</TT></B></LI>

<LI>
<B><TT>write&nbsp;</TT></B></LI>

<LI>
<B><TT>writeln&nbsp;</TT></B></LI>

<LI>
<B><TT>writeAll</TT></B></LI>

<LI>
<B><TT>list&nbsp;</TT></B></LI>

<LI>
<B><TT>mkdir&nbsp;</TT></B></LI>
</TD>
</TR>
</TABLE>
&nbsp;<I>(Henri's stuff)</I>&nbsp;
<BR>&nbsp;</TD>
</TR>
</TABLE>
&nbsp;</TD>
</TR>
</TABLE></CENTER>
&nbsp;
<BR>&nbsp;
</BODY>
</HTML>