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.
This commit is contained in:
@@ -0,0 +1,38 @@
|
||||
^title Process Class
|
||||
|
||||
The Process class lets you work with operating system processes, including the
|
||||
currently running one.
|
||||
|
||||
## Static Methods
|
||||
|
||||
### **allArguments**
|
||||
|
||||
The list of command-line arguments that were passed when the Wren process was
|
||||
spawned. This includes the Wren executable itself, the path to the file being
|
||||
run (if any), and any other options passed to Wren itself.
|
||||
|
||||
If you run:
|
||||
|
||||
:::bash
|
||||
$ wren file.wren arg
|
||||
|
||||
This returns:
|
||||
|
||||
:::wren
|
||||
System.print(Process.allArguments) //> ["wren", "file.wren", "arg"]
|
||||
|
||||
### **arguments**
|
||||
|
||||
The list of command-line arguments that were passed to your program when the
|
||||
Wren process was spawned. This does not include arguments handled by Wren
|
||||
itself.
|
||||
|
||||
If you run:
|
||||
|
||||
:::bash
|
||||
$ wren file.wren arg
|
||||
|
||||
This returns:
|
||||
|
||||
:::wren
|
||||
System.print(Process.arguments) //> ["arg"]
|
||||
Reference in New Issue
Block a user