Lines Matching refs:path

98 (* represent a path in a store.
113 let is_valid path =
114 List.for_all name_is_valid path
122 | "" :: path when is_valid path -> path
125 let of_path_and_name path name =
126 match path, name with
128 | _ -> path @ [name]
130 let create path connection_path =
131 of_string (Utils.path_validate path connection_path)
141 let get_hierarchy path =
142 Utils.get_hierarchy path
155 let rec lookup_modify node path fct =
156 match path with
168 let apply_modify rnode path fct =
169 lookup_modify rnode path fct
171 let rec lookup_get node path =
172 match path with
181 let get_node rnode path =
182 if path = [] then
185 try Some (lookup_get rnode path) with Define.Doesnt_exist -> None
188 (* get the deepest existing node for this path, return the node and a flag on the existence of the …
195 let set_node rnode path nnode =
196 if path = [] then
206 apply_modify rnode path set_node
209 let rec lookup node path fct =
210 match path with
215 let apply rnode path fct =
216 lookup rnode path fct
235 let path_mkdir store perm path =
244 if path = [] then
247 Path.apply_modify store.root path do_mkdir
249 let path_write store perm path value =
261 if path = [] then (
265 Path.apply_modify store.root path do_write, !node_created
267 let path_rm store perm path =
275 if path = [] then
278 Path.apply_modify store.root path do_rm
280 let path_setperms store perm path perms =
281 if path = [] then
291 Path.apply_modify store.root path do_setperms
294 let get_node store path =
295 Path.get_node store.root path
297 let get_deepest_existing_node store path =
298 Path.get_deepest_existing_node store.root path
300 let read store perm path =
306 if path = [] then (
311 Path.apply store.root path do_read
313 let ls store perm path =
315 if path = [] then
322 Path.apply store.root path do_ls in
325 let getperms store perm path =
326 if path = [] then
333 Path.apply store.root path fct
335 let path_exists store path =
336 if path = [] then
343 Path.apply store.root path check_exist
349 let rec _traversal path node =
350 f path node;
351 let node_path = Path.of_path_and_name path (Symbol.to_string node.Node.name) in
358 let dump_node path node =
359 let pathstr = String.concat "/" path in
382 let set_node store path node orig_quota mod_quota =
383 let root = Path.set_node store.root path node in
387 let write store perm path value =
388 let node, existing = get_deepest_existing_node store path in
396 let root, node_created = path_write store perm path value in
401 let mkdir store perm path =
402 let node, existing = get_deepest_existing_node store path in
404 (* It's upt to the mkdir logic to decide what to do with existing path *)
406 store.root <- path_mkdir store perm path;
409 let rm store perm path =
410 let rmed_node = Path.get_node store.root path in
414 store.root <- path_rm store perm path;
417 let setperms store perm path nperms =
418 match Path.get_node store.root path with
424 store.root <- path_setperms store perm path nperms;
475 traversal store.root (fun path node ->