webmcp

annotate libraries/extos/extos.autodoc.lua @ 348:d2429d53a158

Fixed two tiny errors in autodoc comments in mondelefant
author jbe
date Thu Mar 26 03:27:32 2015 +0100 (2015-03-26)
parents 546ec50e7170
children b1748c6c3c89
rev   line source
jbe@268 1
jbe@268 2 --[[--
jbe@268 3 data_out, -- string containing stdout data, or nil in case of error
jbe@268 4 data_err, -- string containing error or stderr data
jbe@268 5 status = -- exit code, or negative code in case of abnormal termination
jbe@268 6 extos.pfilter{
jbe@268 7 data_in = data_in, -- string containing stdin data
jbe@268 8 filename = filename, -- executable
jbe@268 9 arg1 = arg1, -- first (non-zero) argument to executable
jbe@268 10 arg2 = arg2, -- second argument to executable
jbe@268 11 ...
jbe@268 12 }
jbe@268 13
jbe@268 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.
jbe@268 15
jbe@268 16 --]]--
jbe@268 17 -- implemented in extos.c as
jbe@268 18 -- static int extos_pfilter(lua_State *L)
jbe@268 19 --//--
jbe@268 20
jbe@268 21
jbe@268 22 --[[--
jbe@344 23 filestat_table, -- table with information on the file
jbe@344 24 errmsg = -- error message if file information could not be read
jbe@344 25 extos.stat(
jbe@344 26 filename -- path to a file on the file system
jbe@344 27 )
jbe@344 28
jbe@344 29 Return information on a file. The returned table contains the following fields:
jbe@344 30
jbe@344 31 - "dev" (numeric ID of the device containing the file)
jbe@344 32 - "ino" (file's inode number)
jbe@344 33 - "nlink" (number of hard links to the file)
jbe@344 34 - "atime" (time when file data was last accessed)
jbe@344 35 - "mtime" (time when file data was last modified)
jbe@344 36 - "ctime" (time when file status was last changed)
jbe@344 37 - "size" (file size in bytes)
jbe@344 38 - "blksize" (optimal I/O block size for the file)
jbe@344 39 - "blocks" (actual number of blocks allocated for the file in 512-byte units)
jbe@344 40 - "uid" (user ID of the file's owner)
jbe@344 41 - "gid" (group ID of the file)
jbe@344 42 - "mode" (bitfield including the access permissions)
jbe@344 43 - "isblk" (true if block special file)
jbe@344 44 - "ischr" (true if character special file)
jbe@344 45 - "isdir" (true if directory)
jbe@344 46 - "isfifo" (true if pope of FIFO special file)
jbe@344 47 - "islnk" (true if symbolic link)
jbe@344 48 - "isreg" (true if regular file)
jbe@344 49 - "issock" (true if socket)
jbe@344 50
jbe@344 51 On error, nil and an error message are returned.
jbe@344 52
jbe@344 53 --]]--
jbe@344 54 -- implemented in extos.c as
jbe@344 55 -- static int extos_stat(lua_State *L)
jbe@344 56 --//--
jbe@344 57
jbe@344 58
jbe@344 59 --[[--
jbe@345 60 directory_entries, -- table of directory entries
jbe@345 61 errmsg = -- error message if directory could not be read
jbe@345 62 extos.listdir(
jbe@345 63 path -- path name
jbe@345 64 )
jbe@268 65
jbe@345 66 This function returns a table containing strings representing each entry in a directory. On error nil and an error message are returned.
jbe@268 67
jbe@268 68 --]]--
jbe@268 69 -- implemented in extos.c as
jbe@268 70 -- static int extos_listdir(lua_State *L)
jbe@268 71 --//--
jbe@268 72
jbe@268 73
jbe@268 74 --[[--
jbe@268 75 passhash = -- encrypted password
jbe@268 76 extos.crypt{
jbe@268 77 key = key, -- password to be one-way encrypted
jbe@268 78 salt = salt -- salt to be used for encryption, optionally starting with "$N$", where N is a digit
jbe@268 79 }
jbe@268 80
jbe@268 81 This function is a wrapper for the C function char *crypt(const char *key, const char *salt).
jbe@268 82
jbe@268 83 --]]--
jbe@268 84 -- implemented in extos.c as
jbe@268 85 -- static int extos_crypt(lua_State *L)
jbe@268 86 --//--
jbe@268 87
jbe@268 88
jbe@268 89 --[[--
jbe@268 90 seconds =
jbe@268 91 extos.hires_time()
jbe@268 92
jbe@268 93 Returns a unix time stamp representing current time with high resolution.
jbe@268 94
jbe@268 95 --]]--
jbe@268 96 -- implemented in extos.c as
jbe@268 97 -- static int extos_hires_time(lua_State *L)
jbe@268 98 --//--
jbe@268 99
jbe@268 100
jbe@268 101 --[[--
jbe@268 102 seconds =
jbe@268 103 extos.monotonic_hires_time()
jbe@268 104
jbe@268 105 Returns the number of (SI) seconds since loading the library with high resolution.
jbe@268 106
jbe@268 107 --]]--
jbe@268 108 -- implemented in extos.c as
jbe@268 109 -- static int extos_monotonic_hires_time(lua_State *L)
jbe@268 110 --//--
jbe@268 111

Impressum / About Us