npm

Check out our latest tech talk, "JavaScript Supply Chain Security" presented by VP of Security, Adam Baldwin.Watch it here »

downloads-folder

1.0.1 • Public • Published

downloads-folder

Get the local downloads folder, for all major platforms.

Usage

const downloadsFolder = require('downloads-folder');
 
console.log(downloadsFolder());

Installation

$ npm install downloads-folder

API

downloadsFolder()

Return the location of the downloads 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: ~/Downloads
  • Windows: ~/Downloads
  • *nix: xdg-user-dir DOWNLOAD || ~/Downloads || /tmp

License

MIT

Keywords

none

install

npm i downloads-folder

Downloadsweekly downloads

1,682

version

1.0.1

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability