Browse Source

Move `core:path` to `core:path/slashpath`

This is to reduce the confusion that occurs between that package and the `core:path/filepath` package
gingerBill 3 years ago
parent
commit
1d293749c2
3 changed files with 8 additions and 3 deletions
  1. 5 0
      core/path/path_error.odin
  2. 1 1
      core/path/slashpath/match.odin
  3. 2 2
      core/path/slashpath/path.odin

+ 5 - 0
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)`)

+ 1 - 1
core/path/match.odin → core/path/slashpath/match.odin

@@ -1,4 +1,4 @@
-package path
+package slashpath
 
 import "core:strings"
 import "core:unicode/utf8"

+ 2 - 2
core/path/path.odin → 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"