Skip to content

mspace/file-exists

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

file-exists

Check if filepath exists and is a file. Returns false for directories.

Install

npm install file-exists --save

Usage

var fileExists = require('file-exists');

console.log(fileExists('/index.html')) // OUTPUTS: true or false

Options

fileExists(filepath[, options])

  • filepath - the path to the file to check if it exists
  • options - an object of options
    • root - the root directory to look in (or cwd)

Run Tests

npm install
npm test

About

Check if filepath exists and is a file

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%