Skip to content
 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

directory-exists Build Status

Check if a directory exists - synchronously or asynchronously

Install

$ npm install --save directory-exists

Usage:

Asynchronous

const directoryExists = require('directory-exists');
directoryExists(directory, callback(error, result) {
  // result is a boolean
};

Synchronous

const directoryExists = require('directory-exists');

directoryExists.sync(directory); // retuns a boolean

Why not use the fs.exists?

Because asynchronous fs.exists is deprecated. Synchronous fs.existsSync is still fine to use, but this library does both, sync and async.

License

MIT © timmydoza

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages