Stream file = new BufferedFile("sample.txt");
foreach(ulong n, char[] line; file) {
stdout.writefln("line %d: %s",n,line);
}
file.close();
int x;
double y;
char[] s;
file.readf(&x, " hello ", &y, &s);
file.readf("%d hello %f %s", &x, &y, &s);
file.readf("%d hello %f", &x, &y, "%s", &s);
seek(0, SeekPos.Current)
or
seek(pos, SeekPos.Set)
respectively.