Project

General

Profile

$fread » History » Version 4

Per Amundsen, 12/13/2019 06:31 PM

1 1 Per Amundsen
_Added in 1.9.0_
2
3
*$fread(name|N)*
4
5 2 Per Amundsen
Returns the next [[$crlf]] delimited line from an open file from the current position.
6 1 Per Amundsen
7
*Parameters*
8
9
name|N - Name of the file or the Nth file.
10
11 3 Per Amundsen
*Properties*
12
13 4 Per Amundsen
.back - Returns the previous [[$crlf]] delimited line from an open file from the current position. *(AdiIRC only)*
14 3 Per Amundsen
15 1 Per Amundsen
*Example*
16
17
<pre>
18
; Open a file.
19
/fopen Example Example.txt
20
21
; Add some text to the file.
22
/fwrite Example Hello World
23
24
; Read the next line.
25
//echo -ag Next line is: $fread(Example)
26
27
; Close the file.
28
/fclose Example
29
30
; Delete the file.
31
/remove Example
32
</pre>
33 2 Per Amundsen
34
--------------------------------
35
36
*$fread(name|N, M, &binvar)*
37
38
Reads M bytes from an open file to a &binvar.
39
40
*Parameters*
41
42
name|N - Name of the file or the Nth file.
43
M - Number of bytes to read from current position.
44 1 Per Amundsen
&binvar - The &binvar to read into.
45 3 Per Amundsen
46
*Properties*
47
48
.back - Returns M bytes from an open file to a &binvar backwards. (AdiIRC only)