webmcp

annotate 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
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@434 6 extos.pfilter(
jbe@434 7 data_in, -- string containing stdin data
jbe@434 8 filename, -- executable
jbe@434 9 arg1, -- first (non-zero) argument to executable
jbe@434 10 arg2, -- second argument to executable
jbe@268 11 ...
jbe@434 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@351 23 directory_entries, -- table of directory entries
jbe@351 24 errmsg = -- error message if directory could not be read
jbe@351 25 extos.listdir(
jbe@351 26 path -- path name
jbe@351 27 )
jbe@351 28
jbe@351 29 This function returns a table containing strings representing each entry in a directory. On error nil and an error message are returned.
jbe@351 30
jbe@351 31 --]]--
jbe@351 32 -- implemented in extos.c as
jbe@351 33 -- static int extos_listdir(lua_State *L)
jbe@351 34 --//--
jbe@351 35
jbe@351 36
jbe@351 37 --[[--
jbe@351 38 filestat_table, -- table with information on the file, false if file does not exist, nil on error
jbe@351 39 errmsg = -- error message if file information could not be read or file does not exist
jbe@344 40 extos.stat(
jbe@344 41 filename -- path to a file on the file system
jbe@344 42 )
jbe@344 43
jbe@351 44 Return information on a file, following symbolic links if applicable. See also: extos.lstat(...) and extos.fstat(...).
jbe@351 45
jbe@351 46 The returned table contains the following fields:
jbe@344 47
jbe@344 48 - "dev" (numeric ID of the device containing the file)
jbe@344 49 - "ino" (file's inode number)
jbe@344 50 - "nlink" (number of hard links to the file)
jbe@344 51 - "atime" (time when file data was last accessed)
jbe@344 52 - "mtime" (time when file data was last modified)
jbe@344 53 - "ctime" (time when file status was last changed)
jbe@344 54 - "size" (file size in bytes)
jbe@344 55 - "blksize" (optimal I/O block size for the file)
jbe@344 56 - "blocks" (actual number of blocks allocated for the file in 512-byte units)
jbe@344 57 - "uid" (user ID of the file's owner)
jbe@344 58 - "gid" (group ID of the file)
jbe@344 59 - "mode" (bitfield including the access permissions)
jbe@344 60 - "isblk" (true if block special file)
jbe@344 61 - "ischr" (true if character special file)
jbe@344 62 - "isdir" (true if directory)
jbe@344 63 - "isfifo" (true if pope of FIFO special file)
jbe@344 64 - "islnk" (true if symbolic link)
jbe@344 65 - "isreg" (true if regular file)
jbe@344 66 - "issock" (true if socket)
jbe@344 67
jbe@351 68 If the file does not exist, false and an error message are returned.
jbe@351 69 In case of any other error, nil and an error message are returned.
jbe@351 70
jbe@344 71
jbe@344 72 --]]--
jbe@344 73 -- implemented in extos.c as
jbe@344 74 -- static int extos_stat(lua_State *L)
jbe@344 75 --//--
jbe@344 76
jbe@344 77
jbe@344 78 --[[--
jbe@351 79 filestat_table, -- table with information on the file, false if file does not exist, nil on error
jbe@351 80 errmsg = -- error message if file information could not be read or file does not exist
jbe@351 81 extos.lstat(
jbe@351 82 filename -- path to a file on the file system
jbe@345 83 )
jbe@268 84
jbe@351 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).
jbe@351 86
jbe@351 87 See extos.stat(...) for further information.
jbe@268 88
jbe@268 89 --]]--
jbe@268 90 -- implemented in extos.c as
jbe@351 91 -- static int extos_stat(lua_State *L)
jbe@351 92 --//--
jbe@351 93
jbe@351 94
jbe@351 95 --[[--
jbe@351 96 filestat_table, -- table with information on the file, nil on error
jbe@351 97 errmsg = -- error message if file information could not be determined
jbe@351 98 extos.fstat(
jbe@351 99 file_handle -- Lua file handle (e.g. as returned by io.open(...))
jbe@351 100 )
jbe@351 101
jbe@351 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(...).
jbe@351 103
jbe@351 104 See extos.stat(...) for further information.
jbe@351 105
jbe@351 106 --]]--
jbe@351 107 -- implemented in extos.c as
jbe@351 108 -- static int extos_stat(lua_State *L)
jbe@268 109 --//--
jbe@268 110
jbe@268 111
jbe@268 112 --[[--
jbe@268 113 passhash = -- encrypted password
jbe@268 114 extos.crypt{
jbe@268 115 key = key, -- password to be one-way encrypted
jbe@268 116 salt = salt -- salt to be used for encryption, optionally starting with "$N$", where N is a digit
jbe@268 117 }
jbe@268 118
jbe@268 119 This function is a wrapper for the C function char *crypt(const char *key, const char *salt).
jbe@268 120
jbe@268 121 --]]--
jbe@268 122 -- implemented in extos.c as
jbe@268 123 -- static int extos_crypt(lua_State *L)
jbe@268 124 --//--
jbe@268 125
jbe@268 126
jbe@268 127 --[[--
jbe@268 128 seconds =
jbe@268 129 extos.hires_time()
jbe@268 130
jbe@268 131 Returns a unix time stamp representing current time with high resolution.
jbe@268 132
jbe@268 133 --]]--
jbe@268 134 -- implemented in extos.c as
jbe@268 135 -- static int extos_hires_time(lua_State *L)
jbe@268 136 --//--
jbe@268 137
jbe@268 138
jbe@268 139 --[[--
jbe@268 140 seconds =
jbe@268 141 extos.monotonic_hires_time()
jbe@268 142
jbe@268 143 Returns the number of (SI) seconds since loading the library with high resolution.
jbe@268 144
jbe@268 145 --]]--
jbe@268 146 -- implemented in extos.c as
jbe@268 147 -- static int extos_monotonic_hires_time(lua_State *L)
jbe@268 148 --//--
jbe@268 149

Impressum / About Us