aboutsummaryrefslogtreecommitdiffstats
path: root/lib/kernel/Path.ml
diff options
context:
space:
mode:
Diffstat (limited to 'lib/kernel/Path.ml')
-rw-r--r--lib/kernel/Path.ml7
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/kernel/Path.ml b/lib/kernel/Path.ml
index 629a527..5e77c30 100644
--- a/lib/kernel/Path.ml
+++ b/lib/kernel/Path.ml
@@ -1,6 +1,9 @@
type t = string list
let this = []
+let to_list path = path
+let of_list names = names
+let equal = List.equal String.equal
let (@/) x y = x::y
let to_string path =
@@ -30,11 +33,11 @@ let lookup handle path =
let open Utilities.Result in
let open Protocols in
match Directory.from handle with
- | None -> Error (Error.path_not_found path)
+ | None -> Error (Error.not_a_directory path)
| Some dir ->
let* elem = Directory.find dir x in
match elem with
- | None -> Error (Error.not_a_directory path)
+ | None -> Error (Error.path_not_found path)
| Some elem -> walk elem xs
in
walk handle path