Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

downloads-folder

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

downloads-folder

Get the local downloads folder, for all major platforms

  • 3.0.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
31K
increased by10.8%
Maintainers
1
Weekly downloads
 
Created
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

Package last updated on 26 Sep 2020

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc