1.2.1 • Published 5 months ago

@xan105/usershellfolder v1.2.1

Weekly downloads
-
License
MIT
Repository
github
Last release
5 months ago

About

User shell folders.

Example

import { folders } from "@xan105/usershellfolder";

const path = folders.user.desktop;
console.log(path);
//Win: C:\Users\Xan\Desktop
//Linux: /home/Xan/Desktop

Install

npm install @xan105/usershellfolder

API

⚠️ This module is only available as an ECMAScript module (ESM).

Named export

const folders = object

Windows

On Windows return an object as the following:

{
  root: ...,
  temp: ...,
  user: {
    appData: ...,
    localAppData: ...,
    home: ...,
    desktop: ...,
    documents: ...,
    music: ...,
    pictures: ...,
    videos: ...,
    download: ...,
    savegame: ...
  },
  common: {
    appData: ...,
    home: ...,
    desktop: ...,
    documents: ...,
    music: ...,
    pictures: ...,
    videos: ...
  }
}

Linux

On Linux return an object as the following:

{
  root: ...,
  temp: ...,
  user: {
    data: ...,
    config: ...,
    cache: ...,
    home: ...,
    desktop: ...,
    documents: ...,
    music: ...,
    pictures: ...,
    videos: ...,
    download: ... 
  }
}

Default export

Alias to const folders for backward compatibility

1.2.1

5 months ago

1.2.0

5 months ago

1.1.4

1 year ago

1.1.3

1 year ago

1.1.1

2 years ago

1.1.0

2 years ago

1.1.2

1 year ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago