blob: aabd9fc244d356fa866fd75ee09a449c5d46d6f9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
|
---@meta
---@class os*
os = {}
---@return number
function os.clock() end
---@param format string?
---@param time integer?
---@return string
function os.date(format, time) end
---@param t2 integer
---@param t1 integer
---@return integer
function os.difftime(t2, t1) end
---@param command string
---@return boolean suc?
---@return exitcode exitcode?
---@return integer code?
function os.execute(command) end
---@param code boolean|integer?
---@param close boolean?
function os.exit(code, close) end
---@param varname string
---@return string
function os.getenv(varname) end
---@param filename string
---@return boolean suc
---@return string errmsg?
function os.remove(filename) end
---@param oldname string
---@param newname string
---@return boolean suc
---@return string errmsg?
function os.rename(oldname, newname) end
---@alias localecategory
---|>'"all"'
---| '"collate"'
---| '"ctype"'
---| '"monetary"'
---| '"numeric"'
---| '"time"'
---@param locale string|nil
---@param category localecategory?
---@return string localecategory
function os.setlocale(locale, category) end
---@param date table?
---@return integer
function os.time(date) end
---@return string
function os.tmpname() end
return os
|