webmcp

view libraries/extos/extos.autodoc.lua @ 333:51b17cee8432

Updated error message for accidentally setting globals
author jbe
date Tue Mar 24 17:27:28 2015 +0100 (2015-03-24)
parents 599b8463b985
children 985ffb3ef69f
line source
2 --[[--
3 data_out, -- string containing stdout data, or nil in case of error
4 data_err, -- string containing error or stderr data
5 status = -- exit code, or negative code in case of abnormal termination
6 extos.pfilter{
7 data_in = data_in, -- string containing stdin data
8 filename = filename, -- executable
9 arg1 = arg1, -- first (non-zero) argument to executable
10 arg2 = arg2, -- second argument to executable
11 ...
12 }
14 Executes the executable given by "filename", passing optional arguments. A given string may be fed into the program as stdin. On success 3 values are returned: A string containing all stdout data of the sub-process, a string containing all stderr data of the sub-process, and a status code. The status code is negative, if the program didn't terminate normally. By convention a status code of zero indicates success, while positive status codes indicate error conditions. If program execution was not possible at all, then nil is returned as first value and an error string as second value.
16 --]]--
17 -- implemented in extos.c as
18 -- static int extos_pfilter(lua_State *L)
19 --//--
22 --[[--
23 directory_entries = -- table of directory entries
24 extos.listdir{
25 path = path -- path name
26 }
28 This function returns a table containing strings representing each entry in a directory. On error nil and an error message is returned.
30 --]]--
31 -- implemented in extos.c as
32 -- static int extos_listdir(lua_State *L)
33 --//--
36 --[[--
37 passhash = -- encrypted password
38 extos.crypt{
39 key = key, -- password to be one-way encrypted
40 salt = salt -- salt to be used for encryption, optionally starting with "$N$", where N is a digit
41 }
43 This function is a wrapper for the C function char *crypt(const char *key, const char *salt).
45 --]]--
46 -- implemented in extos.c as
47 -- static int extos_crypt(lua_State *L)
48 --//--
51 --[[--
52 seconds =
53 extos.hires_time()
55 Returns a unix time stamp representing current time with high resolution.
57 --]]--
58 -- implemented in extos.c as
59 -- static int extos_hires_time(lua_State *L)
60 --//--
63 --[[--
64 seconds =
65 extos.monotonic_hires_time()
67 Returns the number of (SI) seconds since loading the library with high resolution.
69 --]]--
70 -- implemented in extos.c as
71 -- static int extos_monotonic_hires_time(lua_State *L)
72 --//--

Impressum / About Us