{"id":28615584,"url":"https://github.com/ocamlpro/directories","last_synced_at":"2025-06-12T02:09:29.664Z","repository":{"id":53448029,"uuid":"310020680","full_name":"OCamlPro/directories","owner":"OCamlPro","description":"directories is an OCaml library that provides configuration, cache and data paths (and more!) following the suitable conventions on Linux, macOS and Windows. The following conventions are used: XDG Base Directory Specification and xdg-user-dirs on Linux, Known Folders on Windows, Standard Directories on macOS.","archived":false,"fork":false,"pushed_at":"2025-01-28T09:05:33.000Z","size":87,"stargazers_count":34,"open_issues_count":7,"forks_count":3,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-01-28T10:22:33.082Z","etag":null,"topics":["basedir","cache","config","conventions","data","directories","knownfolders","linux","macos","ocaml","standard","standarddirectories","windows","xdg"],"latest_commit_sha":null,"homepage":"","language":"OCaml","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"isc","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/OCamlPro.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGES.md","contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-11-04T14:06:14.000Z","updated_at":"2025-01-28T09:05:09.000Z","dependencies_parsed_at":"2025-01-20T17:31:55.367Z","dependency_job_id":null,"html_url":"https://github.com/OCamlPro/directories","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/OCamlPro/directories","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OCamlPro%2Fdirectories","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OCamlPro%2Fdirectories/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OCamlPro%2Fdirectories/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OCamlPro%2Fdirectories/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/OCamlPro","download_url":"https://codeload.github.com/OCamlPro/directories/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OCamlPro%2Fdirectories/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259382322,"owners_count":22848842,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["basedir","cache","config","conventions","data","directories","knownfolders","linux","macos","ocaml","standard","standarddirectories","windows","xdg"],"created_at":"2025-06-12T02:09:28.255Z","updated_at":"2025-06-12T02:09:29.623Z","avatar_url":"https://github.com/OCamlPro.png","language":"OCaml","funding_links":[],"categories":[],"sub_categories":[],"readme":"# directories [![Actions Status](https://github.com/ocamlpro/directories/workflows/build/badge.svg)](https://github.com/ocamlpro/directories/actions)\n\ndirectories 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].\n\nThe following conventions are used:\n\n- [XDG Base Directory Specification] and [xdg-user-dirs] on Linux\n- [Known Folders] on Windows\n- [Standard Directories] on macOS\n\nOn Linux and macOS it has no dependency. On Windows, it depends only on [ctypes].\n\n## Quickstart\n\nYou should depend on `directories` then :\n\n```ocaml\nlet () =\n  let module App_id = struct\n    let qualifier = \"com\"\n    let organization = \"YourCompany\"\n    let application = \"yourapp\"\n  end in\n  let module M = Directories.Project_dirs (App_id) in\n  let option_value = function None -\u003e \"None\" | Some v -\u003e v in\n  Format.printf \"cache dir  = `%s`@.\" (option_value M.cache_dir);\n  Format.printf \"config dir = `%s`@.\" (option_value M.config_dir);\n  Format.printf \"data dir   = `%s`@.\" (option_value M.data_dir)\n```\n\nFor more, have a look at the [example] folder.\n\n## About\n\n- [LICENSE]\n- [CHANGELOG]\n\n[CHANGELOG]: ./CHANGES.md\n[example]: ./example/\n[LICENSE]: ./LICENSE.md\n\n[ctypes]: https://github.com/ocamllabs/ocaml-ctypes\n[directories-jvm]: https://github.com/dirs-dev/directories-jvm\n[Known Folders]: https://docs.microsoft.com/fr-fr/windows/win32/shell/known-folders\n[Linux]: https://en.wikipedia.org/wiki/Linux\n[macOS]: https://en.wikipedia.org/wiki/MacOS\n[OCaml]: https://en.wikipedia.org/wiki/OCaml\n[Standard Directories]: https://developer.apple.com/library/archive/documentation/FileManagement/Conceptual/FileSystemProgrammingGuide/FileSystemOverview/FileSystemOverview.html#//apple_ref/doc/uid/TP40010672-CH2-SW6\n[xdg-user-dirs]: https://www.freedesktop.org/wiki/Software/xdg-user-dirs/\n[XDG Base Directory Specification]: https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html\n[Windows]: https://en.wikipedia.org/wiki/Microsoft_Windows\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Focamlpro%2Fdirectories","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Focamlpro%2Fdirectories","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Focamlpro%2Fdirectories/lists"}