Provides utility methods that interface with the operating environment.
- Source Code:
- View Source
Class Method Summary
- Returns the current working directory.
- Returns a path to a directory suitable for storing temporary files.
- Causes the program to immediately stop running, returning the indicated exit code to the operating system.
- Causes the program to perform an illegal operation which forces an abnormal exit.
- Executes an external program with the given command line arguments.
method workingDirectory ():
Returns the current working directory. As relative file paths are evaluated relative to this directory, changing the current working directory will break path evaluation and Frost therfore does not provide a means to do so.
method temporaryDirectory ():
Returns a path to a directory suitable for storing temporary files. The operating environment may or may not automatically delete files written to this directory at some point after the program terminates. A well-behaved program will delete any temporary files it writes.
method exit ( status:
Causes the program to immediately stop running, returning the indicated exit code to the operating system. Generally an exit value of 0 is taken to mean a normal exit and a non-zero value is taken to mean an error occurred, but the interpretation of the exit codeis system-dependent. Cleanup methods are not run when an exit is forced in this fashion; among other things, this means that open files will not be properly flushed and closed, which may cause output to be incomplete.
- value of type
method crash ()
Causes the program to perform an illegal operation which forces an abnormal exit.
Executes an external program with the given command line arguments. If
path is just a filename
(meaning it does not contain any path separator characters), the system PATH environment
variable will be searched to find it.
Returns the resulting process, or an error if it could not be created. Successfully creating the
process does not necessarily mean that the child program can actually be executed. If a
Process is returned, but the child program cannot not be successfully started, the resulting
process will exit immediately with a nonzero exit code, but no error will otherwise be reported.