Socket
Socket
Sign inDemoInstall

downloads-folder

Package Overview
Dependencies
1
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    downloads-folder

Get the local downloads folder, for all major platforms


Version published
Weekly downloads
22K
decreased by-19.85%
Maintainers
1
Install size
5.72 MB
Created
Weekly downloads
 

Readme

Source

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: Computer\HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders{374DE290-123F-4565-9164-39C4925E467B} || ~/Downloads
  • *nix: xdg-user-dir DOWNLOAD || ~/Downloads || /tmp

License

MIT

FAQs

Last updated on 27 Mar 2022

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc