webmcp

view libraries/extos/extos.autodoc.lua @ 434:c7a27cfd07d0

Fixed autodoc documentation of extos.pfilter(...)
author jbe
date Sat Jan 16 01:05:53 2016 +0100 (2016-01-16)
parents b1748c6c3c89
children
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, -- string containing stdin data
8 filename, -- executable
9 arg1, -- first (non-zero) argument to executable
10 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 errmsg = -- error message if directory could not be read
25 extos.listdir(
26 path -- path name
27 )
29 This function returns a table containing strings representing each entry in a directory. On error nil and an error message are returned.
31 --]]--
32 -- implemented in extos.c as
33 -- static int extos_listdir(lua_State *L)
34 --//--
37 --[[--
38 filestat_table, -- table with information on the file, false if file does not exist, nil on error
39 errmsg = -- error message if file information could not be read or file does not exist
40 extos.stat(
41 filename -- path to a file on the file system
42 )
44 Return information on a file, following symbolic links if applicable. See also: extos.lstat(...) and extos.fstat(...).
46 The returned table contains the following fields:
48 - "dev" (numeric ID of the device containing the file)
49 - "ino" (file's inode number)
50 - "nlink" (number of hard links to the file)
51 - "atime" (time when file data was last accessed)
52 - "mtime" (time when file data was last modified)
53 - "ctime" (time when file status was last changed)
54 - "size" (file size in bytes)
55 - "blksize" (optimal I/O block size for the file)
56 - "blocks" (actual number of blocks allocated for the file in 512-byte units)
57 - "uid" (user ID of the file's owner)
58 - "gid" (group ID of the file)
59 - "mode" (bitfield including the access permissions)
60 - "isblk" (true if block special file)
61 - "ischr" (true if character special file)
62 - "isdir" (true if directory)
63 - "isfifo" (true if pope of FIFO special file)
64 - "islnk" (true if symbolic link)
65 - "isreg" (true if regular file)
66 - "issock" (true if socket)
68 If the file does not exist, false and an error message are returned.
69 In case of any other error, nil and an error message are returned.
72 --]]--
73 -- implemented in extos.c as
74 -- static int extos_stat(lua_State *L)
75 --//--
78 --[[--
79 filestat_table, -- table with information on the file, false if file does not exist, nil on error
80 errmsg = -- error message if file information could not be read or file does not exist
81 extos.lstat(
82 filename -- path to a file on the file system
83 )
85 Return information on a file. Symbolic links are not followed, which means that if the filename points to a symbolic link, information on that symbolic link will be returned. Otherwise this function behaves like extos.stat(filename).
87 See extos.stat(...) for further information.
89 --]]--
90 -- implemented in extos.c as
91 -- static int extos_stat(lua_State *L)
92 --//--
95 --[[--
96 filestat_table, -- table with information on the file, nil on error
97 errmsg = -- error message if file information could not be determined
98 extos.fstat(
99 file_handle -- Lua file handle (e.g. as returned by io.open(...))
100 )
102 Return information on an open file. The file is specified by passing an open file handle to this function. Otherwise this function behaves like extos.stat(...).
104 See extos.stat(...) for further information.
106 --]]--
107 -- implemented in extos.c as
108 -- static int extos_stat(lua_State *L)
109 --//--
112 --[[--
113 passhash = -- encrypted password
114 extos.crypt{
115 key = key, -- password to be one-way encrypted
116 salt = salt -- salt to be used for encryption, optionally starting with "$N$", where N is a digit
117 }
119 This function is a wrapper for the C function char *crypt(const char *key, const char *salt).
121 --]]--
122 -- implemented in extos.c as
123 -- static int extos_crypt(lua_State *L)
124 --//--
127 --[[--
128 seconds =
129 extos.hires_time()
131 Returns a unix time stamp representing current time with high resolution.
133 --]]--
134 -- implemented in extos.c as
135 -- static int extos_hires_time(lua_State *L)
136 --//--
139 --[[--
140 seconds =
141 extos.monotonic_hires_time()
143 Returns the number of (SI) seconds since loading the library with high resolution.
145 --]]--
146 -- implemented in extos.c as
147 -- static int extos_monotonic_hires_time(lua_State *L)
148 --//--

Impressum / About Us