sys Module

$

$string string get-env

See get-env.

$

$ get-env

See get-env.

!

!string string system

See system.

!

! system

See system.

&

&string string run

See run.

&

& run

See run.

.

string

Returns the full path to the current directory.

..

string

Returns the full path to the parent directory.

chmod

'sym int

Sets the permissions of file or directory 'sym to int. int is a three-digit representation of user, group and other permissions. See the Unix Permissions Calculator for examples and conversions.

cd

'sym

Change the current directory to {'sym.

cp

'sym1 'sym2

Copies the file or directory 'sym1 to 'sym2.

cpu

string

Returns the host CPU. It can be one of the following strings i386, alpha, powerpc, powerpc64, powerpc64el, sparc, amd64, mips, mipsel, arm, arm64.

env?

'sym bool

Returns true if environment variable 'sym exists, false otherwise.

dir?

'sym bool

Returns true if the specified path 'sym exists and is a directory.

dirname

'sym string

Returns the path of the directory containing path 'sym.

exists?

'sym bool

Returns true if the specified file or directory 'sym exists.

file?

'sym bool

Returns true if the specified path 'sym exists and is a file.

filename

'sym string

Returns the file name of path 'sym.

get-env

'sym string

Returns environment variable 'sym.

hardlink

'sym1 'sym2

Creates hardlink 'sym2 for file or directory 'sym1.

ls

'sym quot

Returns a quotation quot containing all children (files and directories) of the directory 'sym.

ls-r

'sym quot

Returns a quotation quot containing all children (files and directories) of the directory 'sym, recursively.

mkdir

'sym

Creates the specified directory 'sym.

mv

'sym1 'sym2

Moves the file or directory 'sym1 to 'sym2.

os

string

Returns the host operating system. It can be one of the following strings: windows, macosx, linux, netbsd, freebsd, openbsd, solaris, aix, standalone.

put-env

'sym1 'sym2 string

Sets environment variable 'sym2 to 'sym1.

rm

'sym

Deletes the specified file 'sym.

rmdir

'sym

Deletes the specified directory 'sym and all its subdirectories recursively.

run

'sym dict

Executes the external command 'sym in the current directory without displaying its output. Returns a dictionary containing the command output and return code (in keys output and code respectively).

sleep

int

Halts program execution for int milliseconds.

symlink

'sym1 'sym2

Creates symlink 'sym2 for file or directory 'sym1.

symlink?

'sym bool

Returns true if the specified path 'sym exists and is a symbolic link.

system

'sym int

Executes the external command 'sym in the current directory and pushes its return code on the stack.

unzip

'sym

Decompresses zip file 'sym.

which

'sym string

Returns the full path to the directory containing executable 'sym, or an empty string if the executable is not found in $PATH.

zip

'sym quot

Compresses files included in quotation quot into zip file 'sym.