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

fstree

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fstree

recursive filesystem operations

  • 0.0.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Weekly downloads
 
Created
Source

fstree: recursive filesystem functions

There are plenty of modules for doing recursive filesystem operations. These have slightly different semantics than the ones I saw previously.

This module provides three main functions:

copyTree(src, dst, callback): recursively copies "src" to "dst"

This behaves much like "cp -R", except that only regular files, symlinks, and directories are supported (not pipes or devices). Like "cp", this operation fails if the destination already exists. If any part of the operation fails, the partial copy will still be present.

This implementation will only allow 100 outstanding filesystem operations at a time. If you need more, you can bump cpMaxWorkers, but beware of system resource limits (e.g., file descriptors).

rmTree(dir, callback): recursively remove an entire directory tree

This behaves much like "rm -r". Unlike copyTree, this one does not attempt to limit the number of outstanding filesystem operations, but it also doesn't use a file descriptor per file in the tree.

mountLofs(source, dest, callback): create a read-only lofs mount

On illumos systems, this creates a read-only lofs mount of "source" at "dest". This just calls the underlying mount(1M) command.

FAQs

Package last updated on 18 Apr 2012

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