• Stars
    star
    103
  • Rank 333,046 (Top 7 %)
  • Language
    JavaScript
  • License
    Other
  • Created about 14 years ago
  • Updated about 3 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A directory walker for nodejs

walker Build Status

A nodejs directory walker. Broadcasts events for various file types as well as a generic "entry" event for all types and provides the ability to prune directory trees. This shows the entire API; everything is optional:

Walker('/etc/')
  .filterDir(function(dir, stat) {
    if (dir === '/etc/pam.d') {
      console.warn('Skipping /etc/pam.d and children')
      return false
    }
    return true
  })
  .on('entry', function(entry, stat) {
    console.log('Got entry: ' + entry)
  })
  .on('dir', function(dir, stat) {
    console.log('Got directory: ' + dir)
  })
  .on('file', function(file, stat) {
    console.log('Got file: ' + file)
  })
  .on('symlink', function(symlink, stat) {
    console.log('Got symlink: ' + symlink)
  })
  .on('blockDevice', function(blockDevice, stat) {
    console.log('Got blockDevice: ' + blockDevice)
  })
  .on('fifo', function(fifo, stat) {
    console.log('Got fifo: ' + fifo)
  })
  .on('socket', function(socket, stat) {
    console.log('Got socket: ' + socket)
  })
  .on('characterDevice', function(characterDevice, stat) {
    console.log('Got characterDevice: ' + characterDevice)
  })
  .on('error', function(er, entry, stat) {
    console.log('Got error ' + er + ' on entry ' + entry)
  })
  .on('end', function() {
    console.log('All files traversed.')
  })

You specify a root directory to walk and optionally specify a function to prune sub-directory trees via the filterDir function. The Walker exposes a number of events, broadcasting various file type events a generic error event and finally the event to signal the end of the process.

More Repositories

1

dak

Dak is a Lisp like language that transpiles to JavaScript.
Clojure
75
star
2

goruntime

Dockerfile to build a tiny docker image for running go applications
Go
70
star
3

go.httpgzip

Package httpgzip provides a http handler wrapper to transparently add gzip compression.
Go
62
star
4

nodejs-freeport

Find a free port.
JavaScript
48
star
5

nodejs-selenium-launcher

A library to download and launch the Selenium Server.
JavaScript
27
star
6

go.zipexe

Package zipexe attempts to open an executable binary file as a zip file.
Go
23
star
7

nodejs-tmpl

Really simple string formatting.
JavaScript
20
star
8

django-blog-entries

A blog entries application. Spawned from coltrane.
Python
16
star
9

nodejs-dotaccess

A library to access object with "dot notation strings"
JavaScript
14
star
10

werkzeug-debugger-appengine

Monkey patch for werkzeug debugger to use jinja2 and other fixes for app engine compatibility
Python
13
star
11

python-oauth

Python OAuth library
Python
13
star
12

nodejs-makeerror

A library to make errors.
JavaScript
12
star
13

django-oauth-consumer

A django application providing infrastructure for consuming OAuth services.
Python
12
star
14

sqlx-pg-migrate

A library to run migrations on a PostgreSQL database using SQLx.
Rust
11
star
15

streamdiff

An alternate view of your Facebook News Feed
JavaScript
10
star
16

go.domain

Go library to extract the registered domain name or TLD based on a known set.
Go
8
star
17

tictactoe

A synchronous tic tac toe game.
JavaScript
8
star
18

weekend

Social Resturant Menus
Python
7
star
19

go.virtualbox

A Go library for interacting with VirtualBox.
Go
7
star
20

django-flatpage-widget

Allows specifying a custom widget for editing flatpages using a setting
Python
7
star
21

python-urlencoding

URL Encoding helpers
Python
7
star
22

go.viewvar

HTTP handlers for viewing expvar data. Because the stock ones are private.
Go
7
star
23

nodejs-signed-request

A signed JSON container.
JavaScript
6
star
24

go.h

A psuedo-DOM style approach to generating HTML markup.
Go
6
star
25

js-delegator

JavaScript Event Delegation
JavaScript
6
star
26

django-jinja

5
star
27

go.chromedriver

A library to fetch and start the chromedriver server.
Go
5
star
28

django-killemptylines

Middleware to remove empty lines
Python
5
star
29

django-rte-widgets

A collection of editor widgets
JavaScript
4
star
30

errmail

A personal error-to-email package.
Go
4
star
31

python-colorized-logger

A colorized python logger config for use during development
Python
4
star
32

js-herstory

JavaScript History Manager
JavaScript
3
star
33

cssdalek

Exterminate unused CSS for major wins.
Go
3
star
34

qrterm

Package qrterm is a Go library that prints QR codes to the terminal.
Go
3
star
35

go.static

A go.h compatible hashed static asset URIs.
Go
3
star
36

json-service

JSON Web Services for Unit Testing.
Python
3
star
37

daaku.github.com

Python
3
star
38

go.flagbytes

Package flagbytes implements a flag for specifying byte sizes in a human format.
Go
3
star
39

django-sqlalchemy

3
star
40

python-make-request

A minimal wrapper around standard python libraries to make http requests.
Python
3
star
41

f2

f2 is a terminal application for managing two factor authentication codes.
Rust
3
star
42

js-intro

JavaScript: An Introduction
JavaScript
3
star
43

django-nodoubleslashes

Middleware to remove double slashes in the path
Python
3
star
44

django-comment-sanitize

A pre save hook for django comments that uses html5lib to sanitize the comment body
Python
3
star
45

go.ip

Package ip provides a Linux specific network configuration library.
Go
3
star
46

go.xsrf

Package xsrf provides methods for generating and validating XSRF tokens.
Go
3
star
47

nodejs-b64url

URL safe base64 encoding/decoding routines.
JavaScript
2
star
48

django-if-active

Use Django's URL system to determine if active page for use in templates
2
star
49

go.copyfile

Package copyfile provides useful routines for copying files and directories.
Go
2
star
50

hmacsigner

Package hmacsigner provides signed blobs.
Go
2
star
51

django-fuzzy-time

Fuzzy time filter
Python
2
star
52

cliutil

Package cliutil provides some helper functions for writing CLI applications.
Go
2
star
53

go.stats

A simple indirection for collecting application stats.
Go
2
star
54

django-admin-manager-monkey

Monkey patch Django's Admin system to allow specifying a custom manager instead of forcing _default_manager
Python
2
star
55

go.httpzip

Simple wrappers to fetch URLs as zip files in memory.
Go
2
star
56

python-wsgi-logging

Simple wsgi logging middleware
Python
2
star
57

gmeta

A metadata tracking helper for git
2
star
58

archdiff

A tool to view a "system" diff for Arch Linux systems.
Rust
2
star
59

actix-clean-path

Actix Middleware to clean request's URI, and redirect if necessary.
Rust
2
star
60

python-memoize

Python memoize helpers
2
star
61

qutest

A standalone binary to run TypeScript / JavaScript tests in the browser powered by esbuild & chromedp.
JavaScript
2
star
62

tempdir

Tempfile like behaviour for directories
Ruby
2
star
63

pgtest

Package pgtest provides a convenient way of spinning up a postgres server for tests.
Go
2
star
64

python-wsgi-reloader

1
star
65

dlite-jsonp

JavaScript
1
star
66

go.browserid

Package browserid provides a way to have a shared identifier for an incoming http request and allows for it to persist via cookies.
Go
1
star
67

dlite-cache

JavaScript
1
star
68

dlite-fb

JavaScript
1
star
69

impossible

Package impossible converts errors into panics. It is meant to be used when the error is impossible.
Go
1
star
70

buildinfo

Package buildinfo provides a collection of helpers to make introspecting a build as a human or a machine easier.
Go
1
star
71

chromereload

Go
1
star
72

go.h.js.ga

go.h compatible async loading for Google Analytics.
Go
1
star
73

dlite-query

JavaScript
1
star
74

ae_image

Library to make handling image collections on models easy for AppEngine.
Python
1
star
75

xsrf

A library to provide Cross-site request forgery protection primitives.
Rust
1
star
76

dlite-event

JavaScript
1
star
77

debdiff

debdiff shows files not belonging to a package & modified config files.
Go
1
star
78

nodejs-static-app

Build single file static browser apps using node.
JavaScript
1
star
79

webasset

Package webasset manages static frontend assets.
Go
1
star
80

dlite-qs

JavaScript
1
star
81

plls

iTunes playlist creator
1
star
82

fserve

Quick and lean static file serving.
Go
1
star
83

pie

An experimental many file transformer.
Go
1
star
84

osdtools

Some OSD tools to show a pretty overlay for volume, brightness etc.
Go
1
star
85

archrepo

A simple http server for serving arch linux repositories.
Go
1
star
86

django-translatable-model

Provides helpers to enable Language specific Models and Managers
Python
1
star
87

django-paginator

My django paginator helpers
Python
1
star
88

go.h.js.loader

go.h compatible async JS loader
Go
1
star
89

go.h.ui

go.h & twitter bootstrap based ui components.
Go
1
star
90

go.signedrequest

Go library for working with signed request.
Go
1
star