1.1.0 • Published 4 years ago
@does/exist
Check if a file exists and is writeable
const exist = require('@does/exist');
const fileExists = await exist(join(__dirname, 'index.js'));
Options
quiet: false
(default is true
)
Will log error messages when trying to access a file that's not there
await exist(path, {quiet: false});