LostKobrakai
Path module dependency on host OS type
Currently many of the functions in the Path module do depend on the OS type the system is running on. I’m currently working on a filesystem abstraction and there it becomes quite apparent that on my unix system Path.type("D:/usr/local/bin") does return :relative, while it’s an :absolute path on a windows based system. The system is meant to work the same though for windows and unix based deployments and the paths/files handled aren’t even stored on the host machine for most adapters.
I do feel it would make sense to push this implicit dependency on the host os to the api level, so the module can be used to handle paths for other OS’s the same way it can for the OS the system currently runs on.
I’m wondering how others (especially the core team) think about this. Currently the dependency essentially means I can’t use most of the Path module.
First Post!
dimitarvp
Can you expand on your use case? F.ex. why is it important what does Path.type return on the host OS? Why are Windows paths stored on a UNIX host?
And, what kind of a file system abstraction?
Popular in Discussions
Other popular topics
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #channels
- #elixirconf
- #exunit
- #discussion
- #javascript
- #code-sync
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #phoenix_html
- #iex
- #blog-post
- #graphql
- #genstage
- #ai
- #websockets
- #supervisor
- #advent-of-code
- #elixirconf-us
- #distillery
- #processes
- #forms
- #api
- #metaprogramming
- #security
- #performance








