On Saturday, 11 November 2017 at 14:11:50 UTC, Neia Neutuladh
wrote:
At my job, I put together a database migration tool for our
services. It scans for resources in your JAR file with an
appropriate path, interprets them as SQL scripts, and applies
them to the database if it hasn't been done yet.
I want to implement this in D. However, while D allows you to
import individual files, it doesn't let you import an entire
directory.
I can make a prebuild script to generate code for this, but I'm
wondering: do other people find themselves needing this
periodically? If so, I can write a DIP for it, or at least
publish a codegen tool that other people can use.
Why do you want to import files at compile time? Why can't it be
done in run time, by simply reading directory with dirEntries and
opening std.stdio.File for each one?