Hi Gerrit,

If you don’t need the canonical path to a file resource on the file system, file:resolve-path may be the better choice. It can be used for both file URIs and local (relative or absolute) paths.

Hope this helps,
Christian


On Mon, Apr 22, 2024 at 8:00 AM Imsieke, Gerrit, le-tex <gerrit.imsieke@le-tex.de> wrote:
I have a file:// URI that corresponds to a directory that I need to create (using svn mkdir, therefore file:create-dir() is not an option here) if it doesn’t exist. Calling file:path-to-native() on it results in a file:not-found error. Is there a fundamental reason why the file needs to exist before transforming its URI into the OS-native representation? Using BaseX 10.7.

Gerrit