1.0.0 • Published 2 years ago
@tinkink/os-path v1.0.0
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
1.0.0
2 years ago