New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

node-all-directories

Package Overview
Dependencies
Maintainers
2
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install
Package was removed
Sorry, it seems this package was removed from the registry

node-all-directories

Get all the directories - node package

latest
Source
npmnpm
Version
13.0.0
Version published
Maintainers
2
Created
Source

node-all-directories

  • NPM
  • GitHub
  • Checkout Changelog for changes.

v13 (current version)

Dependencies

  • node-directories

Features

  • Get directories in an array that mimics directory structure.
  • Get files.
  • Find directories.

Installation

npm i node-all-direcotories

Usage

Walk through file system


var Directory = require('node-all-directories').Directory
var dirs = new Directory()

dirs.walk(/* depth = 1 */)

// dirs.children contains directories on root dir.

Find directories


const D = require('node-all-directories').Directory
const dirs = new D()
const options = {depth: 4}
const whenFound = (root, tag) => {
    console.log(`root: ${root}, found: ${tag}`)
}
const findThese = ['usr', 'home', 'Movies', 'Documents']
dirs.find(findThese, whenFound, options)

If options.depth to find is greater than dirs.depth, then we walk.

IMPORTANT: Callback is necessary to get the output of find.

License

MIT

  • © 2018 Git Faf
  • © 2021 Anubhav

Keywords

all directories

FAQs

Package last updated on 06 Jun 2021

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