Files
wren/doc/site/modules/os/platform.markdown
T
Bob Nystrom 95ef1a2814 feat: rename process module to os and add Platform class with name and isPosix methods
Rename the "process" module to "os" across all source files, documentation, tests, and build configuration. Add a new Platform class to the os module with static methods `name` (returns OS string like "Windows", "Linux", "OS X", "iOS", "Unix", "POSIX", or "Unknown") and `isPosix` (returns bool indicating POSIX compliance). Update all import paths from "process" to "os" in test files and module registrations. Move process.c/h to os.c/h, rename processSetArguments to osSetArguments, and regenerate the os.wren.inc bytecode source. Add documentation pages for the os module and Platform class.
2016-05-21 19:44:17 +00:00

574 B

^title Platform Class

The Platform class exposes basic information about the operating system Wren is running on top of.

Static Methods

name

The name of the platform. This roughly describes the operating system, and is usually one of:

  • "iOS"
  • "Linux"
  • "OS X"
  • "POSIX"
  • "Unix"
  • "Windows"

If Wren was compiled for an unknown operating system, returns "Unknown".

isPosix

Returns true if the host operating system is known to support the POSIX standard. This is true for Linux and other Unices, as well as the various Apple operating systems.