including arbitrary files into the binary
mandel
mandel at foobar.com
Sat Sep 8 07:39:19 PDT 2007
Hi,
I like to include arbitrary files into the D binary.
writefln(import("data.txt"))
let you include a single file as char[], but that is not sufficient.
I like to include all files from some subdirectories ( ~200 small files).
Ideally I like to create an AA with a path/filename as key
and the file content as value.
They are two problems I see with that:
1. manually writing an import for every file.
2. import doesn't seem to allow you to import with path like import("mydir/data.txt"),
all files must be in the directory defined by the compiler option -J
Is there a solution to this problem?
More information about the Digitalmars-d
mailing list