Note: this will fail for UNC paths that exceed MAX_PATH. But the same is true for many other functions in Phobos.