sq3: show SQLite error messages on stderr by default
[iv.d.git] / vfs / samples / garcls.d
blob3ead18576b909db890db8d37d4a35446da15dd5e
1 #!/usr/bin/env rdmd
2 /* Invisible Vector Library
3 * coded by Ketmar // Invisible Vector <ketmar@ketmar.no-ip.org>
4 * Understanding is not required. Only obedience.
6 * This program is free software: you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation, version 3 of the License ONLY.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
18 import iv.vfs.io;
20 public import iv.vfs.arc.abuse;
21 public import iv.vfs.arc.arcanum;
22 public import iv.vfs.arc.arcz;
23 public import iv.vfs.arc.bsa;
24 public import iv.vfs.arc.dfwad;
25 //public import iv.vfs.arc.dunepak; no signature
26 //public import iv.vfs.arc.f2dat; // no signature
27 //public import iv.vfs.arc.toeedat; // conflicts with arcanum
28 public import iv.vfs.arc.wad2;
31 void main (string[] args) {
32 if (args.length == 1) assert(0, "PAK?");
34 foreach (immutable idx, string aname; args[1..$]) {
35 import std.format : format;
36 try {
37 vfsAddPak(aname, "a%03s:".format(idx));
38 } catch (Exception e) {
39 writeln("ERROR adding archive '", aname, "'!");
40 throw e;
44 writeln(" size packedsz name");
45 writeln("---------- ---------- -------");
47 vfsForEachFile((in ref de) {
48 writefln("%10s %10s %s", de.size, de.stat("pksize").get!long, de.name);
49 });