roc-lang / basic-cli

A basic Command-Line Interface platform
Universal Permissive License v1.0
89 stars 30 forks source link

Additional Path functionality #264

Open ScallyGames opened 3 hours ago

ScallyGames commented 3 hours ago

I'd love to have some additional functions as part of Path

While these are not terribly difficult string operations I'd expect the platform "standard library" to have functionality for that, especially since there is a bunch of pitfalls with it (path separator, trailing slashes / non trailing slashes, etc). Furthermore most of these functions could/should probably work with both Path and Str types.

lukewilliamboswell commented 2 hours ago

The plan is to make a cross-platform package for working with Paths.

Most of the skeleton/design work is completed here;

https://github.com/roc-lang/path

There's nothing blocking progress afaik, would you be interested in helping with this?

ScallyGames commented 2 hours ago

That seems reasonable, I was wondering about the usefulness of having to reimplement Path on any platform that runs on a system like Windows, Mac or Linux. Not sure if I have capacity but I'll look into it.