You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

files-from-path

Package Overview
Dependencies
Maintainers
1
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

files-from-path

Match provided glob paths to file objects with readable stream

0.1.0
Source
npmnpm
Version published
Weekly downloads
16K
-5.29%
Maintainers
1
Weekly downloads
 
Created
Source

files-from-path

Match provided glob paths to file objects with readable stream

Install

# install it as a dependency
$ npm i files-from-path

Usage

import filesFromPath from 'files-from-path'

for await (const f of filesFromPath(`path/to/somewhere`)) {
  console.log(f)
  // { name: '/path/to/me', stream: [Function: stream] }
}

API

The following parameters can be provided to filesFromPath.

NameTypeDescription
paths`IterableAsyncIterable
[options]objectoptions
[options.hidden]booleanInclude .dot files in matched paths
[options.ignore]string[]Glob paths to ignore
[options.followSymlinks]booleanfollow symlinks
[options.preserveMode]booleanpreserve mode
[options.mode]numbermode to use - if preserveMode is true this will be ignored
[options.preserveMtime]booleanpreserve mtime

It yields file like objects in the form of { name: String, stream: AsyncIterator<Buffer> }

FAQs

Package last updated on 19 Jul 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