| Copyright | © 2019-2022 Albert Krewinkel |
|---|---|
| License | MIT |
| Maintainer | Albert Krewinkel <[email protected]> |
| Stability | alpha |
| Portability | Requires GHC 8 or later. |
| Safe Haskell | None |
| Language | Haskell2010 |
HsLua.Module.System
Description
Provide a Lua module containing a selection of functions.System
Synopsis
- documentedModule :: LuaError e => Module e
- arch :: Field e
- compiler_name :: Field e
- compiler_version :: LuaError e => Field e
- os :: Field e
- env :: LuaError e => DocumentedFunction e
- getwd :: LuaError e => DocumentedFunction e
- getenv :: LuaError e => DocumentedFunction e
- ls :: LuaError e => DocumentedFunction e
- mkdir :: LuaError e => DocumentedFunction e
- rmdir :: LuaError e => DocumentedFunction e
- setenv :: LuaError e => DocumentedFunction e
- setwd :: LuaError e => DocumentedFunction e
- tmpdirname :: LuaError e => DocumentedFunction e
- with_env :: LuaError e => DocumentedFunction e
- with_tmpdir :: LuaError e => DocumentedFunction e
- with_wd :: LuaError e => DocumentedFunction e
Module
documentedModule :: LuaError e => Module e Source #
The "system" module.
Fields
Module field containing the machine architecture on which the
program is running. Wraps arch
compiler_name :: Field e Source #
Module field containing the Haskell implementation with which the
host program was compiled. Wraps .compilerName
compiler_version :: LuaError e => Field e Source #
Module field containing the version of compiler_name with which
the host program was compiled.
Functions
env :: LuaError e => DocumentedFunction e Source #
Retrieve the entire environment
getwd :: LuaError e => DocumentedFunction e Source #
Return the current working directory as an absolute path.
getenv :: LuaError e => DocumentedFunction e Source #
Returns the value of an environment variable
ls :: LuaError e => DocumentedFunction e Source #
List the contents of a directory.
mkdir :: LuaError e => DocumentedFunction e Source #
Create a new directory which is initially empty, or as near to empty as the operating system allows.
If the optional second parameter is false, then create the new
directory only if it doesn't exist yet. If the parameter is true,
then parent directories are created as necessary.
rmdir :: LuaError e => DocumentedFunction e Source #
Remove an existing directory.
setenv :: LuaError e => DocumentedFunction e Source #
Set the specified environment variable to a new value.
setwd :: LuaError e => DocumentedFunction e Source #
Change current working directory.
tmpdirname :: LuaError e => DocumentedFunction e Source #
Get the current directory for temporary files.
with_env :: LuaError e => DocumentedFunction e Source #
Run an action, then restore the old environment variable values.
with_tmpdir :: LuaError e => DocumentedFunction e Source #
with_wd :: LuaError e => DocumentedFunction e Source #
Run an action in a different directory, then restore the old working directory.