Documentation Contents
jrunscript JavaScript built-ins

Class GLOBALS

Object
   |
   +--GLOBALS

class GLOBALS

 
Method Summary
<static> void cat(obj, pattern)
           Shows the content of a file, URL or InputStream
<static> void cd(target)
           Changes the present working directory to the given directory
<static> void cp(from, to)
           Copies a file, URL, or stream to another file or stream
<static> void date()
           Prints the current date using the current locale
<static> void del(pathname)
           A synonym for 'rm'
<static> void dir(d, filter)
           A synonym for 'ls'.
<static> Object dirname(pathname)
           Returns the directory part of a filename
<static> void echo(x)
           Echoes the given string arguments
<static> void exec(cmd)
           Execs a child process, waits for completion & returns exit code
<static> void exit(code)
           Exit the shell program.
<static> void find(dir, pattern, callback)
           Find in files.
<static> void grep(pattern, files )
           Unix-like grep, but accepts JavaScript regex patterns
<static> void ip(name)
           Prints the IP addresses of a given domain name
<static> void load(str)
           Loads and evaluates JavaScript code from a stream, file, or URL
<static> void ls(dir, filter)
           Lists the files in a directory
<static> void mkdir(dir)
           Creates a new directory of a given name
<static> void mkdirs(dir)
           Creates a directory, including any necessary but nonexistent parent directories.
<static> void mv(from, to)
           Moves a file to another
<static> Object printf(format, args)
           A C-like printf
<static> void pwd()
           Print the working directory
<static> void quit(code)
           synonym for exit
<static> Object read(prompt, multiline)
           Reads one or more lines from stdin after printing a prompt
<static> void ren(from, to)
           A synonym for 'mv'.
<static> Object rm(pathname)
           Removes a given file
<static> void rmdir(pathname)
           Removes a given directory
<static> void which(cmd)
           Prints which command is selected from PATH
<static> Object XMLDocument(inp)
           Converts input to DOM Document object
<static> Object XMLResult(out)
           Converts an arbitrary stream, file to an XMLResult
<static> Object XMLSource(inp)
           Converts an arbitrary stream, file, URL to an XMLSource
<static> void XSLTransform(inp, style, out)
           Perform XSLT transform


Method Detail

cat

<static> void cat(obj, pattern)

cd

<static> void cd(target)

cp

<static> void cp(from, to)

date

<static> void date()

del

<static> void del(pathname)

dir

<static> void dir(d, filter)

dirname

<static> Object dirname(pathname)

echo

<static> void echo(x)

exec

<static> void exec(cmd)

exit

<static> void exit(exitCode)

find

<static> void find(dir, pattern, callback)

grep

<static> void grep(pattern, files )

ip

<static> void ip(name)

load

<static> void load(str)

ls

<static> void ls(dir, filter)

mkdir

<static> void mkdir(dir)

mkdirs

<static> void mkdirs(dir)

mv

<static> void mv(from, to)

printf

<static> Object printf(format, args)

pwd

<static> void pwd()

quit

<static> void quit(code)

read

<static> Object read(prompt, multiline)

ren

<static> void ren(from, to)

rm

<static> Object rm(pathname)

rmdir

<static> void rmdir(pathname)

which

<static> void which(cmd)

XMLDocument

<static> Object XMLDocument(inp)

XMLResult

<static> Object XMLResult(out)

XMLSource

<static> Object XMLSource(inp)

XSLTransform

<static> void XSLTransform(inp, style, out)


Oracle and/or its affiliates Copyright © 1993, 2011, Oracle and/or its affiliates. All rights reserved.
Contact Us