Skip to content

tinkink-net/os-path

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

system path related utils

Resources

Stars

Watchers

Forks

Packages

No packages published