package directories
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>
On This Page
An OCaml library that provides configuration, cache and data paths (and more!) following the suitable conventions on Linux, macOS and Windows
Install
dune-project
Dependency
Authors
Maintainers
Sources
0.7.tar.gz
sha256=a7626d412d0f3520eb9c5b1f74b843dd8c95fcfb185979cccc603cea289ccf4a
sha512=c1558bde98cd3cc2b33144903f089fa7917e1d1143c30180a3131ff8e62905ebfe36ec0d926215ef4f7c26a12a3407eaad2c76b2d945e6c2d8011fefac062d70
doc/README.html
directories 
directories is an OCaml library that provides configuration, cache and data paths (and more!) following the suitable conventions on Linux, macOS and Windows. It is inspired by similar libraries for other languages such as directories-jvm.
The following conventions are used:
- XDG Base Directory Specification and xdg-user-dirs on Linux
- Known Folders on Windows
- Standard Directories on macOS
It only depends on fpath. On Windows, it also has a build-dependency on ctypes.
Quickstart
You should depend on directories then :
let () =
let module App_id = struct
let qualifier = "com"
let organization = "YourCompany"
let application = "yourapp"
end in
let module M = Directories.Project_dirs (App_id) in
let option_value = function None -> "None" | Some v -> v in
Format.printf "cache dir = `%s`@." (option_value M.cache_dir);
Format.printf "config dir = `%s`@." (option_value M.config_dir);
Format.printf "data dir = `%s`@." (option_value M.data_dir)For more, have a look at the example folder.
About
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>
On This Page