xdg-basedir

WebJar for xdg-basedir

Лицензия

Лицензия

MIT
Группа

Группа

org.webjars.npm
Идентификатор

Идентификатор

xdg-basedir
Последняя версия

Последняя версия

4.0.0
Дата

Дата

Тип

Тип

jar
Описание

Описание

xdg-basedir
WebJar for xdg-basedir
Ссылка на сайт

Ссылка на сайт

https://www.webjars.org
Система контроля версий

Система контроля версий

https://github.com/sindresorhus/xdg-basedir

Скачать xdg-basedir

Как подключить последнюю версию

<!-- https://jarcasting.com/artifacts/org.webjars.npm/xdg-basedir/ -->
<dependency>
    <groupId>org.webjars.npm</groupId>
    <artifactId>xdg-basedir</artifactId>
    <version>4.0.0</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.npm/xdg-basedir/
implementation 'org.webjars.npm:xdg-basedir:4.0.0'
// https://jarcasting.com/artifacts/org.webjars.npm/xdg-basedir/
implementation ("org.webjars.npm:xdg-basedir:4.0.0")
'org.webjars.npm:xdg-basedir:jar:4.0.0'
<dependency org="org.webjars.npm" name="xdg-basedir" rev="4.0.0">
  <artifact name="xdg-basedir" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.npm', module='xdg-basedir', version='4.0.0')
)
libraryDependencies += "org.webjars.npm" % "xdg-basedir" % "4.0.0"
[org.webjars.npm/xdg-basedir "4.0.0"]

Зависимости

Библиотека не имеет зависимостей. Это самодостаточное приложение, которое не зависит ни от каких других библиотек.

Модули Проекта

Данный проект не имеет модулей.

xdg-basedir Build Status

Get XDG Base Directory paths

This package is meant for Linux. You should not use XDG on macOS and Windows. Instead, you should follow their platform conventions. You can use env-paths for that.

Install

$ npm install xdg-basedir

Usage

const xdgBasedir = require('xdg-basedir');

xdgBasedir.data;
//=> '/home/sindresorhus/.local/share'

xdgBasedir.config;
//=> '/home/sindresorhus/.config'

xdgBasedir.dataDirs
//=> ['/home/sindresorhus/.local/share', '/usr/local/share/', '/usr/share/']

API

The properties .data, .config, .cache, .runtime will return null in the uncommon case that both the XDG environment variable is not set and the users home directory can't be found. You need to handle this case. A common solution is to fall back to a temp directory.

.data

Directory for user-specific data files.

.config

Directory for user-specific configuration files.

.cache

Directory for user-specific non-essential data files.

.runtime

Directory for user-specific non-essential runtime files and other file objects (such as sockets, named pipes, etc).

.dataDirs

Preference-ordered array of base directories to search for data files in addition to .data.

.configDirs

Preference-ordered array of base directories to search for configuration files in addition to .config.


Get professional support for this package with a Tidelift subscription
Tidelift helps make open source sustainable for maintainers while giving companies
assurances about security, maintenance, and licensing for their dependencies.

Версии библиотеки

Версия
4.0.0
3.0.0
2.0.0
1.0.0