Compile time filesystem access?

Manu turkeyman at gmail.com
Mon Jan 30 05:41:15 PST 2012


On 30 January 2012 15:30, Vladimir Panteleev <vladimir at thecybershadow.net>wrote:

> On Monday, 30 January 2012 at 13:23:19 UTC, Manu wrote:
>
>> Is D capable of accessing the filesystem at compile time, for instance, to
>> load and parse an XML DOM, or some other structural metadata, which may be
>> used to generate the associative struct and its members?
>> I can think of many other uses for the technology too. It seems extremely
>> powerful, and I'm sure it's been discussed :)
>>
>
> That's what the import("filename") expression is for:
> http://dlang.org/expression.**html#ImportExpression<http://dlang.org/expression.html#ImportExpression>
>
> You'll need to approve paths for inclusion with the -J switch.
>

Magic! :)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20120130/d63b9754/attachment-0001.html>


More information about the Digitalmars-d mailing list