ospath
DefinitelyTyped icon, indicating that this package has TypeScript declarations provided by the separate @types/ospath package

1.2.2 • Public • Published

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

Dependencies (0)

    Dev Dependencies (4)

    Package Sidebar

    Install

    npm i ospath

    Weekly Downloads

    4,056,894

    Version

    1.2.2

    License

    MIT

    Last publish

    Collaborators

    • jprichardson