XDG library path support for OCaml via Eio capabilities
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

xdge: fix README — create→v, find_config_file→config_file

+3 -3
+3 -3
README.md
··· 27 27 28 28 ```ocaml 29 29 (* Filesystem access is an explicit capability *) 30 - let xdg = Xdge.create env#fs "myapp" 30 + let xdg = Xdge.v env#fs "myapp" 31 31 ``` 32 32 33 33 The capability model provides the benefit that code that needs filesystem ··· 41 41 42 42 ```ocaml 43 43 Eio_main.run @@ fun env -> 44 - let xdg = Xdge.create env#fs "myapp" in 44 + let xdg = Xdge.v env#fs "myapp" in 45 45 46 46 (* Access XDG directories as Eio paths *) 47 47 let config = Xdge.config_dir xdg in 48 48 let data = Xdge.data_dir xdg in 49 49 50 50 (* Search for files following XDG precedence *) 51 - match Xdge.find_config_file xdg "settings.json" with 51 + match Xdge.config_file xdg "settings.json" with 52 52 | Some path -> (* use path *) 53 53 | None -> (* use defaults *) 54 54 ```