read_line
Description:
Reads a line, including any line terminating character(s), from a FileStream. Returns a newly-allocated string containing the line, excluding any line terminator.
Example: Read a line:
public static int main (string[] args) {
// Opens "foo.txt" for reading ("r")
FileStream stream = FileStream.open ("filestream.vala", "r");
assert (stream != null);
string? line = null;
while ((line = stream.read_line ()) != null) {
print (line);
print ("\n");
}
return 0;
}
valac --pkg glib-2.0 GLib.FileStream.read_line.vala