Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

check-folder-exists

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

check-folder-exists

Node module to check if local file path contains a specified folder name using NodeJS

  • 0.1.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
Maintainers
1
Weekly downloads
 
Created
Source

Node module to check if local file path contains a specified folder name using NodeJS

This module returns a promise. This package is available via npm

npm install --save check-folder-exists

Example Usage

In the example below we are checking if the filePath (first parameter) /Users/jremi/Documents has folderName (second parameter) existing named Foo.

Note: This example can be found in this repository inside /example.js

var checkFolderExists =  require('check-folder-exists');

checkFolderExists('/Users/jremi/Documents/', 'Foo')
.then(function(res){
   console.log(res);
})
.catch(function(err){
    console.log(err);
});

Parameter 1, is the filePath Parameter 2, is the folderName to check

- If folder is found, promise returns true
- If folder is not found, promise returns false
- If file path is invalid, promise returns error

Questions

Shoot a message or open an issue. If you like this repo please ⭐ :)

Pull requests are welcomed.

If anyone has any code work, hit me up. I can always use some extra bucks.

Keywords

FAQs

Package last updated on 18 Mar 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc