summaryrefslogtreecommitdiff
path: root/server
diff options
context:
space:
mode:
Diffstat (limited to 'server')
-rw-r--r--server/libs/lua53/file.lni37
-rw-r--r--server/libs/lua53/io.lni2
-rw-r--r--server/locale/en-US/libs/lua53/file.lni91
-rw-r--r--server/locale/en-US/libs/lua53/io.lni2
4 files changed, 114 insertions, 18 deletions
diff --git a/server/libs/lua53/file.lni b/server/libs/lua53/file.lni
index 29d4a950..3ff04be8 100644
--- a/server/libs/lua53/file.lni
+++ b/server/libs/lua53/file.lni
@@ -1,4 +1,3 @@
-
<default>
type = 'function'
[[.parent]]
@@ -6,10 +5,12 @@ type = 'object'
name = 'FILE*'
[close]
+[[.args]]
+type = 'FILE*'
[[.returns]]
name = 'suc'
type = 'boolean'
-default = 'true'
+default = true
optional = 'after'
[[.returns]]
name = 'type'
@@ -24,12 +25,15 @@ type = 'type'
enum = 'signal'
[flush]
+[[.args]]
+type = 'FILE*'
[lines]
[[.args]]
+type = 'FILE*'
+[[.args]]
name = 'mode'
type = '...'
-default = 'l'
[[.returns]]
type = 'function'
returns = {
@@ -43,16 +47,11 @@ name = 'mode'
enum = 'n'
[[.enums]]
name = 'mode'
-enum = 'n'
-[[.enums]]
-name = 'mode'
-enum = 'i'
-[[.enums]]
-name = 'mode'
enum = 'a'
[[.enums]]
name = 'mode'
enum = 'l'
+default = true
[[.enums]]
name = 'mode'
enum = 'L'
@@ -62,26 +61,24 @@ code = 'number'
[read]
[[.args]]
+type = 'FILE*'
+[[.args]]
name = 'mode'
type = '...'
-default = 'l'
[[.returns]]
type = {'string', 'number'}
+[[.returns]]
+type = '...'
[[.enums]]
name = 'mode'
enum = 'n'
[[.enums]]
name = 'mode'
-enum = 'n'
-[[.enums]]
-name = 'mode'
-enum = 'i'
-[[.enums]]
-name = 'mode'
enum = 'a'
[[.enums]]
name = 'mode'
enum = 'l'
+default = true
[[.enums]]
name = 'mode'
enum = 'L'
@@ -91,9 +88,10 @@ code = 'number'
[seek]
[[.args]]
+type = 'FILE*'
+[[.args]]
name = 'whence'
type = 'string'
-default = 'cur'
optional = 'after'
[[.args]]
name = 'offset'
@@ -113,12 +111,15 @@ enum = 'set'
[[.enums]]
name = 'whence'
enum = 'cur'
+default = true
[[.enums]]
name = 'whence'
enum = 'end'
[setvbuf]
[[.args]]
+type = 'FILE*'
+[[.args]]
name = 'mode'
type = 'string'
[[.args]]
@@ -136,6 +137,8 @@ enum = 'line'
[write]
[[.args]]
+type = 'FILE*'
+[[.args]]
type = '...'
[[.returns]]
type = 'FILE*'
diff --git a/server/libs/lua53/io.lni b/server/libs/lua53/io.lni
index d34b78b9..d2f79cf8 100644
--- a/server/libs/lua53/io.lni
+++ b/server/libs/lua53/io.lni
@@ -149,6 +149,8 @@ name = 'mode'
type = '...'
[[.returns]]
type = {'string', 'number'}
+[[.returns]]
+type = '...'
[[.enums]]
name = 'mode'
enum = 'n'
diff --git a/server/locale/en-US/libs/lua53/file.lni b/server/locale/en-US/libs/lua53/file.lni
new file mode 100644
index 00000000..176b2034
--- /dev/null
+++ b/server/locale/en-US/libs/lua53/file.lni
@@ -0,0 +1,91 @@
+[close]
+description = 'Close `file`.'
+
+[flush]
+description = 'Saves any written data to `file`.'
+
+[lines]
+description = [[
+------
+```lua
+for c in file:lines(...) do
+ body
+end
+```
+]]
+[[.enums]]
+name = 'mode'
+enum = 'n'
+description = 'Reads a numeral and returns it as number.'
+[[.enums]]
+name = 'mode'
+enum = 'a'
+description = 'Reads the whole file.'
+[[.enums]]
+name = 'mode'
+enum = 'l'
+description = 'Reads the next line skipping the end of line.'
+[[.enums]]
+name = 'mode'
+enum = 'L'
+description = 'Reads the next line keeping the end of line.'
+[[.enums]]
+name = 'mode'
+code = 'number'
+description = 'Reads a string with up to this number of bytes.'
+
+[read]
+description = 'Reads the `file`, according to the given formats, which specify what to read.'
+[[.enums]]
+name = 'mode'
+enum = 'n'
+description = 'Reads a numeral and returns it as number.'
+[[.enums]]
+name = 'mode'
+enum = 'a'
+description = 'Reads the whole file.'
+[[.enums]]
+name = 'mode'
+enum = 'l'
+description = 'Reads the next line skipping the end of line.'
+[[.enums]]
+name = 'mode'
+enum = 'L'
+description = 'Reads the next line keeping the end of line.'
+[[.enums]]
+name = 'mode'
+code = 'number'
+description = 'Reads a string with up to this number of bytes.'
+
+[seek]
+description = 'Sets and gets the file position, measured from the beginning of the file.'
+[[.enums]]
+name = 'whence'
+enum = 'set'
+description = 'Base is beginning of the file.'
+[[.enums]]
+name = 'whence'
+enum = 'cur'
+description = 'Base is current position.'
+[[.enums]]
+name = 'whence'
+enum = 'end'
+description = 'Base is end of file.'
+
+[setvbuf]
+description = 'Sets the buffering mode for an output file.'
+[[.enums]]
+name = 'mode'
+enum = 'no'
+description = 'Output operation appears immediately.'
+[[.enums]]
+name = 'mode'
+enum = 'full'
+description = 'Performed only when the buffer is full.'
+[[.enums]]
+name = 'mode'
+enum = 'line'
+description = 'Buffered until a newline is output.'
+
+[write]
+description = 'Writes the value of each of its arguments to `file`.'
diff --git a/server/locale/en-US/libs/lua53/io.lni b/server/locale/en-US/libs/lua53/io.lni
index 496a573c..f68602b5 100644
--- a/server/locale/en-US/libs/lua53/io.lni
+++ b/server/locale/en-US/libs/lua53/io.lni
@@ -88,7 +88,7 @@ enum = 'w'
description = 'Write data to this program by `file`.'
[read]
-description = 'Reads the file file, according to the given formats, which specify what to read.'
+description = 'Reads the `file`, according to the given formats, which specify what to read.'
[[.enums]]
name = 'mode'
enum = 'n'