Lines Matching refs:path

105 (* represent a path in a store.
120 let is_valid path =
121 List.for_all name_is_valid path
129 | "" :: path when is_valid path -> path
132 let of_path_and_name path name =
133 match path, name with
135 | _ -> path @ [name]
137 let create path connection_path =
138 of_string (Utils.path_validate path connection_path)
148 let get_hierarchy path =
149 Utils.get_hierarchy path
162 let rec lookup_modify node path fct =
163 match path with
175 let apply_modify rnode path fct =
176 lookup_modify rnode path fct
178 let rec lookup_get node path =
179 match path with
188 let get_node rnode path =
189 if path = [] then
192 try Some (lookup_get rnode path) with Define.Doesnt_exist -> None
195 (* get the deepest existing node for this path, return the node and a flag on the existence of the …
202 let set_node rnode path nnode =
203 if path = [] then
213 apply_modify rnode path set_node
216 let rec lookup node path fct =
217 match path with
222 let apply rnode path fct =
223 lookup rnode path fct
247 let path_mkdir store perm path =
256 if path = [] then
259 Path.apply_modify store.root path do_mkdir
261 let path_write store perm path value =
273 if path = [] then (
277 let root = Path.apply_modify store.root path do_write in
280 let path_rm store perm path =
288 if path = [] then (
292 Path.apply_modify store.root path do_rm
294 let path_setperms store perm path perms =
295 if path = [] then (
306 Path.apply_modify store.root path do_setperms
309 let get_node store path =
310 Path.get_node store.root path
312 let get_deepest_existing_node store path =
313 Path.get_deepest_existing_node store.root path
315 let read store perm path =
321 if path = [] then (
326 Path.apply store.root path do_read
328 let ls store perm path =
330 if path = [] then (
338 Path.apply store.root path do_ls in
341 let getperms store perm path =
342 if path = [] then (
350 Path.apply store.root path fct
352 let path_exists store path =
353 if path = [] then
360 Path.apply store.root path check_exist
366 let rec _traversal path node =
367 f path node;
368 let node_path = Path.of_path_and_name path (Symbol.to_string node.Node.name) in
375 let dump_node path node =
376 let pathstr = String.concat "/" path in
399 let set_node store path node orig_quota mod_quota =
400 let root = Path.set_node store.root path node in
404 let write store perm path value =
405 let node, existing = get_deepest_existing_node store path in
413 let root, node_created = path_write store perm path value in
418 let mkdir store perm path =
419 let node, existing = get_deepest_existing_node store path in
421 (* It's upt to the mkdir logic to decide what to do with existing path *)
423 store.root <- path_mkdir store perm path;
426 let rm store perm path =
427 let rmed_node = Path.get_node store.root path in
431 store.root <- path_rm store perm path;
434 let setperms store perm path nperms =
435 match Path.get_node store.root path with
442 store.root <- path_setperms store perm path nperms;