I’m missing a validation-step in
URL's interface to retrieving local files. Namely calling
URL::isLocalFile() can return
true when a subsequent call to
URL::getLocalFile() can hit an assertion. This can easily be reproduced by passing a Unix style path in an URL on Windows e.g.
Could we have a method in
URL to validate that constructing a
File object from it is legal or alternatively expose a method similar to
URL::fileFromFileSchemeURL() that returns an unescaped and processed path encoded in the URL so we can perform this validation our self?
Also an addition to the documentation warning about a possible second assertion would be welcome.