From 1d293749c2f0751c112e91f1337a83cbc3c5cb04 Mon Sep 17 00:00:00 2001 From: gingerBill Date: Mon, 17 Jan 2022 11:38:15 +0000 Subject: [PATCH] Move `core:path` to `core:path/slashpath` This is to reduce the confusion that occurs between that package and the `core:path/filepath` package --- core/path/path_error.odin | 5 +++++ core/path/{ => slashpath}/match.odin | 2 +- core/path/{ => slashpath}/path.odin | 4 ++-- 3 files changed, 8 insertions(+), 3 deletions(-) create mode 100644 core/path/path_error.odin rename core/path/{ => slashpath}/match.odin (99%) rename core/path/{ => slashpath}/path.odin (94%) diff --git a/core/path/path_error.odin b/core/path/path_error.odin new file mode 100644 index 000000000..2be0b4cf4 --- /dev/null +++ b/core/path/path_error.odin @@ -0,0 +1,5 @@ +package path + +#panic( +`core:path/slashpath - for paths separated by forward slashes, e.g. paths in URLs, this does not deal with OS-specific paths +core:path/filepath - uses either forward slashes or backslashes depending on the operating system, deals with Windows/NT paths with volume letters or backslashes (on the related platforms)`) diff --git a/core/path/match.odin b/core/path/slashpath/match.odin similarity index 99% rename from core/path/match.odin rename to core/path/slashpath/match.odin index 0bea4f6e7..09e774275 100644 --- a/core/path/match.odin +++ b/core/path/slashpath/match.odin @@ -1,4 +1,4 @@ -package path +package slashpath import "core:strings" import "core:unicode/utf8" diff --git a/core/path/path.odin b/core/path/slashpath/path.odin similarity index 94% rename from core/path/path.odin rename to core/path/slashpath/path.odin index 186176b42..8ac10e655 100644 --- a/core/path/path.odin +++ b/core/path/slashpath/path.odin @@ -1,9 +1,9 @@ -// The path package is only to be used for paths separated by forward slashes, +// The slashpath package is only to be used for paths separated by forward slashes, // e.g. paths in URLs // // This package does not deal with Windows/NT paths with volume letters or backslashes // To manipulate operating system specific paths, use the path/filepath package -package path +package slashpath import "core:strings"