commit aa9f1791c11635937c6de2593a33059161123713
parent 5d22b63c9cb0325eeadeddb957f6369439803d43
Author: Drew DeVault <sir@cmpwn.com>
Date: Sun, 7 Mar 2021 09:28:01 -0500
path: remove is_root
This function does not entirely make sense
Diffstat:
1 file changed, 0 insertions(+), 9 deletions(-)
diff --git a/path/names.ha b/path/names.ha
@@ -61,15 +61,6 @@ export fn basename(path: path::path) path::path = {
assert(basename(p) as str == "foo");
};
-// Returns true if the given path is a root directory.
-export fn is_root(path: path::path) bool = {
- let b = pathbytes(path);
- if (len(b) == 0) {
- return false;
- };
- return b[0] == PATHSEP;
-};
-
// Returns the file extension for a path. This presumes that the file extension
// is a valid UTF-8 string, if not, it will return an empty string. The return
// value is borrowed from the input, see [strings::dup] to extend its lifetime.