Skip to content

Simple way to check if path exists and is a file/directory. Made for stattic tool.

License

Notifications You must be signed in to change notification settings

statticjs/stattic-pstat

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

stattic-pstat

npm npm

Simple way for check if path exists and is a file/directory.

Example of use:

var pStat = require('stattic-pstat');

//Check if file exists
if(pStat.isFile('route/to/file.ext') === true)
{
  //Path exists and is a file, do something
  // ...
}

//Check if directory exists
if(pStat.isDir('route/to/dir') === true)
{
  //Path exists and is a directory, do something
  // ...
}

:)

About

Simple way to check if path exists and is a file/directory. Made for stattic tool.

Resources

License

Stars

Watchers

Forks

Packages

No packages published