This class provides access to various base functions of system platforms.
Look in the sys
package for more system APIs.
Static methods
staticprintln(v:Dynamic):Void
Available on clay native, unity
Prints any value to the standard output, followed by a newline. On Windows, this function outputs a CRLF newline. LF newlines are printed on all other platforms.
staticargs():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.
staticsleep(seconds:Float):Void
Available on clay native, unity
Suspends execution for the given length of time (in seconds).
staticgetCwd():String
Gets the current working directory (usually the one in which the program was started).
staticsetCwd(s:String):Void
Changes the current working directory.
(java) This functionality is not available on Java; calling this function will throw.
staticsystemName():String
Returns the type of the current system. Possible values are:
- "Windows"
- "Linux"
- "BSD"
- "Mac"
staticexit(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.
statictime():Float
Available on clay native, unity
Gives the most precise timestamp value available (in seconds).