Sys

class SysAvailable in neko, php, cpp, cs, java static function args() : Array<String>Returns all the arguments that were passed by the commandline. static function command( cmd : String, ?args : Array<String> ) : IntRun the given command with the list of arguments. The command output will be printed on the same output as the current process. The current process will block until the command terminates and it will return the command result (0 if there was no error). Read the sys.io.Process api for a more complete way to start background processes. static function cpuTime() : FloatGives the most precise timestamp value (in seconds) but only account for the actual time spent running on the CPU for the current thread/process. static function environment() : StringMap<String>Returns the whole environement variables. static function executablePath() : StringReturns the path to the current executable that we are running. static function exit( code : Int ) : VoidExit the current process with the given error code. static function getChar( echo : Bool ) : IntRead a single input character from the standard input (without blocking) and returns it. Setting echo to true will also display it on the output. static function getCwd() : StringGet the current working directory (usually the one in which the program was started) static function getEnv( s : String ) : StringReturns the value of the given environment variable. static function print( v : Dynamic ) : VoidPrint any value on the standard output. static function println( v : Dynamic ) : VoidPrint any value on the standard output, followed by a newline static function putEnv( s : String, v : String ) : VoidAvailable in javaSet the value of the given environment variable. Warning: It is not implemented in Java static function putEnv( s : String, v : String ) : VoidAvailable in neko, php, cpp, csSet the value of the given environment variable. static function setCwd( s : String ) : VoidChange the current working directory. static function setTimeLocale( loc : String ) : BoolChange the current time locale, which will affect DateTools.format date formating. Returns true if the locale was successfully changed static function sleep( seconds : Float ) : VoidSuspend the current execution for the given time (in seconds). static function stderr() : OutputReturns the process standard error on which you can write. static function stdin() : InputReturns the process standard input, from which you can read what user enters. Usually it will block until the user send a full input line. See getChar for an alternative. static function stdout() : OutputReturns the process standard output on which you can write. static function systemName() : StringReturns the name of the system you are running on. For instance : "Windows", "Linux", "BSD" and "Mac" depending on your desktop OS. static function time() : FloatGives the most precise timestamp value (in seconds).
version #19315, modified 2013-05-08 11:13:57 by api
0 comment