sys Module

admin?

∅ ⇒ bool

Returns true if the program is being run with administrative privileges.

cd

'sym ⇒ ∅

Change the current directory to 'sym.

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.

cp

'sym1 'sym2 ⇒ ∅

Copies the file or directory 'sym1 to 'sym2.

cpu

∅ ⇒ str

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.

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

∅ ⇒ str

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

parent-dir

∅ ⇒ str

Returns the full path to the parent directory.

pwd

∅ ⇒ str

Returns the full path to the current directory.

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.

system

'sym ⇒ int

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

unzip

'sym1 'sym2 ⇒ ∅

Decompresses zip file 'sym1 to directory 'sym2 (created if not present).

which

'sym ⇒ str

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

zip

quot 'sym ⇒ ∅

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