ospath
Operating system specific paths.
Last updated 10 years ago by jprichardson .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install ospath 
SYNC missed versions from official npm registry.

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

Current Tags

  • 1.2.2                                ...           latest (10 years ago)

6 Versions

  • 1.2.2                                ...           10 years ago
  • 1.2.0                                ...           10 years ago
  • 1.1.0                                ...           11 years ago
  • 1.0.2                                ...           11 years ago
  • 1.0.1                                ...           11 years ago
  • 1.0.0                                ...           11 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 3
Last Day 0
Last Week 3
Last Month 0
Dependencies (0)
None
Dev Dependencies (4)
Dependents (1)

Copyright 2013 - present © cnpmjs.org | Home |