-
Notifications
You must be signed in to change notification settings - Fork 0
pos
Peter edited this page Mar 19, 2024
·
5 revisions
_G.pos
Signature | Return | Description |
---|---|---|
setPath() |
nil |
Set the package path to _G.newPackagePath
|
instanceClass(class, ...) |
T |
Instance a given class |
realizePath(path) |
string |
Realize path relative to current program |
relizePath(path) |
string |
DEPRECATED Use realizePath(path)
|
version() |
string |
Get the current PeterOS version |
versionId() |
string |
Get the current PeterOS version ID (vX.X or vX.X-dev ) |
require(path) |
any |
Require packages from /os/ and /os/lib/
|
Variable | Description |
---|---|
[log: pos.Logger ] |
OS log |
_G.pos.setPath(): nil
Set the package path to _G.newPackagePath
_G.pos.instanceClass(class: table, ...): T
Instance a given class
-
class: table
- Class table of typeT
-
...
- constructor arguments
instance: T
_G.pos.realizePath(path: string): string
Realize path relative to current program
-
path: string
- Relative path
-
path: string
- Absolute path
_G.pos.relizePath(path: string): string
DEPRECATED use pos.realizePath(path)
instead
Realize path relative to current program
-
path: string
- Relative path
-
path: string
- Absolute path
_G.pos.version(): string
Gets the current PeterOS version
-
version: string
- PeterOS version
_G.pos.versionId(): string
Get the current POS version ID (vX.X
or vX.X-dev
)
-
versionId: string
- PeterOS version ID in the formatvX.X
orvX.X-dev
_G.pos.require(path: string): any
Require function.
Works to require pos packages from /os/
and /os/lib/
-
path: string
- Package name and path (.
separated)
package: any