An open API service indexing awesome lists of open source software.

https://github.com/rishvic/dirs-go

a low-level library that provides config/cache/data paths, following the respective conventions on Linux, macOS and Windows
https://github.com/rishvic/dirs-go

Last synced: 4 months ago
JSON representation

a low-level library that provides config/cache/data paths, following the respective conventions on Linux, macOS and Windows

Awesome Lists containing this project

README

          

![GitHub](https://img.shields.io/github/license/Colocasian/dirs-go)

# `dirs`

## Introduction

- a tiny low-level library with a minimal API
- that provides the platform-specific, user-accessible locations
- for retrieving and storing configuration, cache and other data
- on Linux, Windows, macOS and other platforms.

The library provides the location of these directories by leveraging the mechanisms defined by

- the [XDG base directory](https://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html) and
the [XDG user directory](https://www.freedesktop.org/wiki/Software/xdg-user-dirs/) specifications on Linux
- the [Known Folder](https://msdn.microsoft.com/en-us/library/windows/desktop/dd378457.aspx) API on Windows
- the [Standard Directories](https://developer.apple.com/library/content/documentation/FileManagement/Conceptual/FileSystemProgrammingGuide/FileSystemOverview/FileSystemOverview.html#//apple_ref/doc/uid/TP40010672-CH2-SW6)
guidelines on macOS

## Platforms

This library is written in Go, and supports Linux, macOS and Windows.
Other platforms are also supported; they use the XDG conventions.

It's mid-level sister library, _directories_, is available for Rust ([directories-rs](https://github.com/dirs-dev/directories-rs))
and on the JVM ([directories-jvm](https://github.com/dirs-dev/directories-jvm)).

## License

Licensed under Apache License 2.0.