npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

zfse

v0.3.1

Published

Zhou's File System Extension to the 'fs' module of node.js.

Readme

#zfse

Zhou's File System Extension to the 'fs' module of node.js

##Installation $ npm install zfse

##Usage

var zfse = require('zfse');

##API ###Methods Method | Brief :---------------------------|:----- copyDir |Copies a directory. copyFile |Copies a file. find |Searches a directory. rRmDir |Recursively removes a directory. rRename |Recursively renames the files under a directory. traverse |Traverses a directory with a specified callback applied to every file node.

#####Arguments

  • src : String

    The source directory.

  • dst : String

    The destination directory.

  • [options] : Object

    Options.

If the destination is a directory, the source file copy will be copied to it with the same file name.

#####Arguments

  • src : String

    The source file.

  • dst : String

    The destination file, or directory.

  • [options] : Object

    Options.

This method is a synchronous function, though it calls a callback function.

#####Arguments

  • dir : String

    The directory from which search starts.

  • [namePattern] : RegExp

    Search pattern in regular expression.

    If namePattern isn't specified, all files (including sub-directories) will be matched.

  • callback : Function The callback function to run for each file node that is found.

  • [callback_arg...] Optional arguments passed to callback

This method works in a similar way as linux shell command 'rm -rf'. If dir is a single file, this method works in the same way as fs.unlinkSync()

#####Arguments

  • dir : String

    The directory to remove.

  • [options] : Object

    Options.

    • [options.dryrun=false] : Boolean

      Dry-runs with verbose output only.

This method works in a similar way as the following linux shell command:

find -name namePattern -exec mv \{\} newName ;

#####Arguments

  • dir : String

    The directory from which search starts.

  • namePattern : RegExp

    Search pattern in regular expression.

  • newName : String

    The new file name.

  • [options] : Object

    Options.

    • [options.dryrun=false] : Boolean

      Dry-runs with verbose output only.

This method is a synchronous function, though it calls a callback function.

#####Arguments

  • dir : String

    The directory from which search starts.

  • [options] : Object

    Options.

    • [options.depthfirst=true] : Boolean

      If true, [depth-first traversal](http://en.wikipedia.org/wiki/Depth-first_search); otherwise, [breadth-first traversal](http://en.wikipedia.org/wiki/Breadth-first_search)
    • [options.callbackdelay=true] : Boolean

      If true, when meeting a file node, calling to `callback` is delayed until returning back from all its sub-nodes.
          
  • callback : Function

    The callback function to run for each file node.

  • [callback_arg...]

    Optional arguments passed to callback.

#####Examples The following code snippet traverses through your current directory and prints every file node.

var zfse = require('zfse');
zfse.traverse('./', function (f) {
    console.log(f);
});