Socket
Book a DemoInstallSign in
Socket

ospath

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ospath

Operating system specific paths.

latest
Source
npmnpm
Version
1.2.2
Version published
Weekly downloads
3.8M
59.7%
Maintainers
1
Weekly downloads
 
Created
Source

ospath

npm Package build status

A JavaScript component that provides operating specific path values.

Installation

npm i --save ospath

API

ospath.data()

Returns the directory where an application should store its data directory.

  • Windows: %APPDATA%
  • OS X: ~/Library/Application Support
  • Unix-like: $XDG_CONFIG_HOME or ~/.config

ospath.desktop()

Returns the users desktop directory. On every OS, this is just the home() dir and Desktop.

ospath.home()

Returns the user's home directory.

  • Windows: %USERPROFILE%
  • Unix-like: $HOME

ospath.tmp()

Returns a temporary directory. Could also use require('os').tmpdir().

  • Windows: %TEMP%
  • Unix-like: /tmp

License

MIT

Keywords

home

FAQs

Package last updated on 07 Sep 2016

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