app-data-folder

1.0.0 • Public • Published

App Data Folder

A simple library that makes it easy to get the Application Data folder for the current operating system.

Usage

npm install app-data-folder
let appData = require('app-data-folder');
let applicationName = 'Storm';
let appDataPath = appData(applicationName); // returns a platform specific path to the default location for application data
 
// e.g.
// Windows: C:\\Users\\<User Name>\\AppData\\Roaming\\<application name>
// MacOS: /Users/<User Name>/Library/Application Support/<application name>
// linux: /home/<User Name>/.<application name>

I cringe at the thought of copying this code into each one of my apps. So I made it into a reusable library. Maybe a bit overkill but it makes me sleep better.

Check out some of my bigger projects at https://www.stormfolder.com

Package Sidebar

Install

npm i app-data-folder

Weekly Downloads

78

Version

1.0.0

License

MIT

Unpacked Size

4.24 kB

Total Files

5

Last publish

Collaborators

  • payne8