Sys

Sys (Class)

This class provides access to various base functions of system platforms. Look in the sys package for more system APIs.

Static Members

args(): Array<String>

Returns all the arguments that were passed in the command line. This does not include the interpreter or the name of the program file.

(java)(eval) On Windows, non-ASCII Unicode arguments will not work correctly.

(cs) Non-ASCII Unicode arguments will not work correctly.

Returns
Array<String>

getCwd(): String

Gets the current working directory (usually the one in which the program was started).

Returns
String

setCwd(s: String): Void

Changes the current working directory.

(java) This functionality is not available on Java; calling this function will throw.

Name Type
s String

systemName(): String

Returns the type of the current system. Possible values are:

  • "Windows"
  • "Linux"
  • "BSD"
  • "Mac" | Returns | |---------| | String |

exit(code: Int): Void

Exits the current process with the given exit code.

(macro)(eval) Being invoked in a macro or eval context (e.g. with -x or --run) immediately terminates the compilation process, which also prevents the execution of any --next sections of compilation arguments.

Name Type
code Int

Metadata

Name Parameters
:dce -