Initial data commit

This commit is contained in:
Ingy döt Net 2023-07-01 11:58:00 -04:00
parent 72d218235f
commit f23f22d71c
199087 changed files with 3378941 additions and 0 deletions

View file

@ -0,0 +1,22 @@
import std.file, std.stdio, std.path, std.file, std.stream,
std.mmfile;
void main() {
immutable fileName = "file_size.exe";
try {
writefln("File '%s' has size:", fileName);
writefln("%10d bytes by std.file.getSize (function)",
std.file.getSize(fileName));
writefln("%10d bytes by std.stream (class)",
new std.stream.File(fileName).size);
// mmfile can treat the file as an array in memory.
writefln("%10d bytes by std.mmfile (class)",
new std.mmfile.MmFile(fileName).length);
} catch (Exception e) {
e.msg.writefln;
}
}