# Splitpath/joinpath for non-native paths?

**URL:** <https://discourse.julialang.org/t/splitpath-joinpath-for-non-native-paths/123336>\
**Category:** General Usage\
**Tags:** filesystem\
**Created:** [December 2, 2024, 2:23am UTC](https://discourse.julialang.org/t/splitpath-joinpath-for-non-native-paths/123336 "2024-12-02T02:23:44Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![stevengj](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/stevengj/32/71_2.png) [@stevengj](https://discourse.julialang.org/u/stevengj)\
**Post date:** [December 2, 2024, 2:54am UTC](https://discourse.julialang.org/t/splitpath-joinpath-for-non-native-paths/123336/2 "2024-12-02T02:54:31Z")

</div>

> [@Convert filepath to URI](https://discourse.julialang.org/t/convert-filepath-to-uri/123334/4):
>
> > [@Convert filepath to URI](https://discourse.julialang.org/t/convert-filepath-to-uri/123334/4):
> >
> > It won’t convert backslash to forward slashes
> 
> This problem highlights a problem in Base.Filesystem.

Well, the “it” in my sentence referred to `URIs.escapeuri` — URIs.jl currently doesn’t have any functions for handling file paths, _only_ URI paths, so this particular issue had nothing to do with `Base`.

Regarding your point, though, that `splitpath` and `joinpath` are currently only for the system you are running on, I agree that in _principle_ it would be nice to be able to handle “foreign” file paths too. Though this doesn’t seem to come up in practice very often?

(However, it shouldn’t be an issue for @thestoicone in ~~this thread~~ the original thread, because they are using `walkdir` to generate file paths, and hence their paths will always be for the native OS.)

---

_[View the full topic](https://discourse.julialang.org/t/splitpath-joinpath-for-non-native-paths/123336)._
