Socket
Socket
Sign inDemoInstall

gentle-fs

Package Overview
Dependencies
24
Maintainers
5
Versions
10
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    gentle-fs

Gentle Filesystem operations


Version published
Weekly downloads
119K
decreased by-5.19%
Maintainers
5
Install size
357 kB
Created
Weekly downloads
 

Changelog

Source

2.3.1 (2020-03-25)

<a name="2.3.0"></a>

Readme

Source

gentle-fs npm version license Travis AppVeyor Coverage Status

gentle-fs is a standalone library for "gently" remove or link directories.

Install

$ npm install gentle-fs

Table of Contents

Example

// todo

Features

  • Performs filesystem operations "gently". Please see details in the API specs below for a more precise definition of "gently".

API

> rm(target, opts, cb)

Will delete all directories between target and opts.base, as long as they are empty. That is, if target is /a/b/c/d/e and base is /a/b, but /a/b/c has other files besides the d directory inside of it, /a/b/c will remain.

Example
rm(target, opts, cb)
> link(from, to, opts, cb)

If from is a real directory, and from is not the same directory as to, will symlink from to to, while also gently rming the to directory, and then call the callback. Otherwise, will call callback with an Error.

Example
link(from, to, opts, cb)
> linkIfExists(from, to, opts, cb)

Performs the same operation as link, except does nothing when from is the same as to, and calls the callback.

Example
linkIfExists(from, to, opts, cb)

Keywords

FAQs

Last updated on 25 Mar 2020

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc