1.0.0 • Published 2 years ago

@tinkink/os-path v1.0.0

Weekly downloads
-
License
MIT
Repository
-
Last release
2 years ago

os-path System path related utils

Install & Usage

npm i @tinkink/os-path
import { home, tmp, applicationData, getWritablePath } from '@tinkink/os-path';

// get home directory
console.log(home());

// get temporary directory
console.log(tmp());

// get application data directory
console.log(applicationData());

// get application data directory for app
console.log(applicationData('appName'));

// get a writable path for app, will try
// - applicationData('appName')
// - home() + .appName
// - process.cwd() + .appName
// - tmp() + appName
console.log(getWritablePath('appName'));

History

1.0.0 2022-08-10

  • Initial version