Module platform

A module for determining information about the execution platform

Functions

platform () Returns the current execution platform.
architecture () Returns the current processor architecture.

Tables

const Platform-specific constants

Fields

is_windows A constant indicating whether the current execution platform is Windows.
is_minecraft A constant indicating whether the current execution platform is Minecraft.
lua_version The current version of Lua, as a string (e.g.


Functions

platform ()
Returns the current execution platform. Values can include "windows", "darwin", "linux", "minecraft", or whatever the lower-case version of `uname` returns. "unknown" is returned if the output from `uname` is empty (e.g. in case of an error).

Returns:

    A string indicating the current execution platform
architecture ()
Returns the current processor architecture. The string returned will be one of 'x86', 'x64', 'ia64', 'unknown', or, on Minecraft only, 'turtle' or 'computer'. If no OS can be detected, then we attempt to call `uname -p` and return what it does.

Returns:

    A string indicating the processor architecture

Tables

const
Platform-specific constants

Fields:

  • dirsep The directory separator
  • pathsep The path separator
  • extsep The extension separator

Fields

is_windows
A constant indicating whether the current execution platform is Windows.
is_minecraft
A constant indicating whether the current execution platform is Minecraft.
lua_version
The current version of Lua, as a string (e.g. "5.1", "5.2", etc.)
generated by LDoc 1.3.12