summaryrefslogtreecommitdiff
path: root/locale/en-US/libs/@lua/file.lni
blob: 58bb22781910b73ba3b21964b66ea9db2d12eb46 (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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
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.'
``````````
name = 'mode'
enum = '"a"'
description = 'Reads the whole file.'
``````````
name = 'mode'
enum = '"l"'
description = 'Reads the next line skipping the end of line.'
``````````
name = 'mode'
enum = '"L"'
description = 'Reads the next line keeping the end of line.'
``````````
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.'
``````````
name = 'mode'
enum = '"a"'
description = 'Reads the whole file.'
``````````
name = 'mode'
enum = '"l"'
description = 'Reads the next line skipping the end of line.'
``````````
name = 'mode'
enum = '"L"'
description = 'Reads the next line keeping the end of line.'
``````````
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.'
``````````
name = 'whence'
enum = '"cur"'
description = 'Base is current position.'
``````````
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.'
``````````
name = 'mode'
enum = '"full"'
description = 'Performed only when the buffer is full.'
``````````
name = 'mode'
enum = '"line"'
description = 'Buffered until a newline is output.'

[write]
description = 'Writes the value of each of its arguments to `file`.'