Skip to content

Latest commit

 

History

History

exist

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 

@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});