userdir

package module
v0.0.0-...-20f291c Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 6, 2015 License: MIT Imports: 2 Imported by: 6

README

userdir

Build Status GoDoc

userdir is a small library which allows you to get user directories according to the operating system conventions.

Simple example:

d := userdir.GetDataHome()
fmt.Println(d)
// Outputs something like this
//   /home/vincent/.local/share        - on Linux
//   C:/Users/vincent/AppData/Roaming  - on Windows
//   /Users/vincent/Library            - on Mac OS X

Windows specificities

On Windows userdir will use the operating systems function SHGetKnownFolderPath.

Linux specificities

On Linux userdir will use the XDG Base Directory Specification.

Further support

Still needs support for other Unixes (might be as simple as using XDG there too) and Mac OS X.

License

userdir is under the MIT license.

Documentation

Overview

Package userdir provides functions to get user directories

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetConfigHome

func GetConfigHome() string

GetConfigHome returns the user config directory.

func GetDataHome

func GetDataHome() string

GetDataHome returns the user data directory.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL