@myrpc/documents-folder

1.0.1 • Public • Published

documents-folder

Get the local documents folder, for all major platforms.

Usage

const documentsFolder = require('@myrpc/documents-folder');

console.log(documentsFolder());

Installation

$ npm install @myrpc/documents-folder
# OR
$ yarn add @myrpc/documents-folder

API

documentsFolder()

Return the location of the documents folder for the current platform.

Warning: On *nix, this will perform synchronous operations, so don't place it where concurrency is required. It's probably the best to just determine this folder once when your application starts.

Algorithm

  • Mac OS X: ~/Documents
  • Windows: ~/Documents
  • *nix: xdg-user-dir DOCUMENTS || ~/Documents || /tmp

License

MIT

Readme

Keywords

none

Package Sidebar

Install

npm i @myrpc/documents-folder

Weekly Downloads

1

Version

1.0.1

License

MIT

Unpacked Size

7.65 kB

Total Files

14

Last publish

Collaborators

  • railrunner16