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

appdirectory

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

appdirectory

A cross-platform utility to find the best directory to put data and config files.

  • 0.1.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
141K
decreased by-21.54%
Maintainers
1
Weekly downloads
 
Created

What is appdirectory?

The appdirectory npm package is designed to help you find the appropriate directories for storing application data, configuration files, and cache files in a cross-platform manner. It abstracts away the differences between operating systems, providing a consistent API for accessing these directories.

What are appdirectory's main functionalities?

Get User Data Directory

This feature allows you to get the directory path where user-specific data should be stored. The code sample demonstrates how to create an instance of AppDirectory for an application named 'MyApp' and retrieve the user data directory.

const AppDirectory = require('appdirectory');
const dirs = new AppDirectory('MyApp');
console.log(dirs.userData());

Get User Config Directory

This feature allows you to get the directory path where user-specific configuration files should be stored. The code sample shows how to retrieve the user config directory for an application named 'MyApp'.

const AppDirectory = require('appdirectory');
const dirs = new AppDirectory('MyApp');
console.log(dirs.userConfig());

Get User Cache Directory

This feature allows you to get the directory path where user-specific cache files should be stored. The code sample demonstrates how to retrieve the user cache directory for an application named 'MyApp'.

const AppDirectory = require('appdirectory');
const dirs = new AppDirectory('MyApp');
console.log(dirs.userCache());

Get Shared Data Directory

This feature allows you to get the directory path where shared data should be stored. The code sample shows how to retrieve the shared data directory for an application named 'MyApp'.

const AppDirectory = require('appdirectory');
const dirs = new AppDirectory('MyApp');
console.log(dirs.sharedData());

Other packages similar to appdirectory

Keywords

FAQs

Package last updated on 11 Mar 2014

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