readText fails to open file
GreatEmerald
pastas4 at gmail.com
Sun Jun 17 04:26:34 PDT 2012
On Sunday, 17 June 2012 at 08:35:58 UTC, Jonathan M Davis wrote:
> Also, you need to check exists before you check isFile,
> otherwise isFile will
> blow up if the file doesn't exst. And both of those are
> properties, so you
> should be calling them like
>
> auto filename = args[1];
>
> if(!filename.exists || !filename.isFile)
> ...
>
> The -property flag enforces this behavior, and it will
> eventually become the
> normal compiler behavior.
>
> - Jonathan M Davis
Oh, I see, thanks!
More information about the Digitalmars-d-learn
mailing list