Os.getenv

From GiderosMobile
Revision as of 14:31, 13 July 2023 by Hgy29 (talk | contribs) (Text replacement - "</source>" to "</syntaxhighlight>")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Available since: Gideros 2011.6
Class: os

Description

Returns the value of the process environment variable varname, or nil if the variable is not defined.

(any) = os.getenv(varname)

Parameters

varname: (string) name of the variable

Return values

Returns (any) value of the variable

Examples

os.getenv("HOME") -- user folder on Mac & Linux
os.getenv("HOMEPATH") -- user folder on Windows
os.getenv("HOMEDRIVE") -- user drive on Windows