The "enforce => throw specific exception" pattern is better expressed as:
```D
enforceEx!FileException(result, pathname.idup);
```