package xdg

  1. Overview
  2. No Docs
XDG Base Directory Specification

Install

dune-project
 Dependency

Authors

Maintainers

Sources

dune-3.24.2.tbz
sha256=472798691b0216daf538709f0f4703b3617ef24ad0866c9096068baaba4d762a
sha512=13082a66a28e940d4b3c9f78b556f6c1455987cd522355ba4502e01e60a3d002d3101b51284726ae21aa87494efa2dc54d016173f05b616bbc5dad714d5714a3

doc/index.html

xdg - the XDG base directories specification

Introduction

Where should your application put its files? Somewhere in $HOME? Do non-Unix systems have something like that? What about cache files?

Fortunately, there is a standard for this - the XDG base directories specification.

This library implements this standard and extends it in a way that works on Windows too.

Example

This computes the name of a config file for a program named acme.

  let config_file_path =
    let xdg = Xdg.create ~env:Sys.getenv_opt () in
    let config_dir = Xdg.config_dir xdg in
    Filename.concat config_dir "acme"

API documentation

The entry point for this library is Xdg.