-
Couldn't load subscription status.
- Fork 12
Open
Labels
enhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomershelp wantedExtra attention is neededExtra attention is needed
Description
Currently, we have the following two types for paths:
AbsolutePathfor, well, absolute paths,LocalPathfor any paths.
We lack a separate type to specify a relative-only type, so let's get one. @PaGrom makes a good argument on its existence, see #1 (comment).
I propose the following design:
struct RelativePath
{
public RelativePath(string path, bool trimLeadingSlash = false) { … }
}Examples:
new RelativePath("foo/bar") // => foo/bar
new RelativePath("/foo/bar", trimLeadingSlash = true) // => foo/bar
new RelativePath("/foo/bar"); // exceptionWhether trimLeadingSlash should be true or false by default I am not sure. @PaGrom, what do you think? I would lean towards more strict behavior by default.
See TODO[#23] in the project sources when implementing this.
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomershelp wantedExtra attention is neededExtra attention is needed