Socket
Book a DemoInstallSign in
Socket

@frctl/ffs

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@frctl/ffs

Fractal filesystem utilities

latest
Source
npmnpm
Version
0.2.1
Version published
Maintainers
1
Created
Source

ffs

Fractal filesystem utilities.

Build Status NPM Version

API

.readDir(src)

Reads a directory (or directories) of files and represents them as File objects. Returns a Promise.

  • src: Directory path (or array of paths) to read from [required]
const fs = require('@frctl/fs');

fs.readDir('path/to/files').then(files => {
  console.log(files);
});

.cloneFile(file[, props])

Clone a File, optionally overwriting it's properties with those from props.

  • file: Instance of File that should be cloned [required]
  • props: Set of properties to overwrite on the cloned file
const fs = require('@frctl/fs');

const file = new fs.File({
  path: '/path/to/file.js',
  contents: Buffer.from('The file contents')
});

const cloned = fs.cloneFile(file, {
  path: '/path/to/foo.js'
});

Installation

npm i @frctl/ffs --save

Requirements

Node >= v6.0 is required.

FAQs

Package last updated on 28 Apr 2017

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