update urls
This commit is contained in:
parent
cccd13e0fc
commit
b4b38f7520
39
README.md
39
README.md
|
@ -1,6 +1,8 @@
|
||||||
node-walk
|
node-walk
|
||||||
====
|
====
|
||||||
|
|
||||||
|
| Sponsored by [ppl](https://ppl.family)
|
||||||
|
|
||||||
nodejs walk implementation.
|
nodejs walk implementation.
|
||||||
|
|
||||||
This is somewhat of a port python's `os.walk`, but using Node.JS conventions.
|
This is somewhat of a port python's `os.walk`, but using Node.JS conventions.
|
||||||
|
@ -28,10 +30,9 @@ Getting Started
|
||||||
(function () {
|
(function () {
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
var walk = require('walk')
|
var walk = require('walk');
|
||||||
, fs = require('fs')
|
var fs = require('fs');
|
||||||
, walker
|
var walker;
|
||||||
;
|
|
||||||
|
|
||||||
walker = walk.walk("/tmp", options);
|
walker = walk.walk("/tmp", options);
|
||||||
|
|
||||||
|
@ -103,11 +104,10 @@ Both Asynchronous and Synchronous versions are provided.
|
||||||
(function () {
|
(function () {
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
var walk = require('walk')
|
var walk = require('walk');
|
||||||
, fs = require('fs')
|
var fs = require('fs');
|
||||||
, options
|
var options;
|
||||||
, walker
|
var walker;
|
||||||
;
|
|
||||||
|
|
||||||
options = {
|
options = {
|
||||||
followLinks: false
|
followLinks: false
|
||||||
|
@ -133,7 +133,7 @@ Both Asynchronous and Synchronous versions are provided.
|
||||||
// * type
|
// * type
|
||||||
// * error
|
// * error
|
||||||
// * name
|
// * name
|
||||||
|
|
||||||
next();
|
next();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -168,11 +168,10 @@ I don't think I can prevent the `process.nextTick()` that `EventEmitter` calls.
|
||||||
(function () {
|
(function () {
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
var walk = require('walk')
|
var walk = require('walk');
|
||||||
, fs = require('fs')
|
var fs = require('fs');
|
||||||
, options
|
var options;
|
||||||
, walker
|
var walker;
|
||||||
;
|
|
||||||
|
|
||||||
// To be truly synchronous in the emitter and maintain a compatible api,
|
// To be truly synchronous in the emitter and maintain a compatible api,
|
||||||
// the listeners must be listed before the object is created
|
// the listeners must be listed before the object is created
|
||||||
|
@ -190,7 +189,7 @@ I don't think I can prevent the `process.nextTick()` that `EventEmitter` calls.
|
||||||
// * type
|
// * type
|
||||||
// * error
|
// * error
|
||||||
// * name
|
// * name
|
||||||
|
|
||||||
next();
|
next();
|
||||||
}
|
}
|
||||||
, file: function (root, fileStats, next) {
|
, file: function (root, fileStats, next) {
|
||||||
|
@ -222,7 +221,7 @@ Emitted Values
|
||||||
* *stats[Array]* - a single `stats` object or an array with some added attributes
|
* *stats[Array]* - a single `stats` object or an array with some added attributes
|
||||||
* type - 'file', 'directory', etc
|
* type - 'file', 'directory', etc
|
||||||
* error
|
* error
|
||||||
* name - the name of the file, dir, etc
|
* name - the name of the file, dir, etc
|
||||||
* next - no more files will be read until this is called
|
* next - no more files will be read until this is called
|
||||||
|
|
||||||
Single Events - fired immediately
|
Single Events - fired immediately
|
||||||
|
@ -278,12 +277,12 @@ Note that `find.js` omits the start directory
|
||||||
|
|
||||||
time bash -c "node examples/find.js /System -type d | wc"
|
time bash -c "node examples/find.js /System -type d | wc"
|
||||||
59490 97934 6262908
|
59490 97934 6262908
|
||||||
|
|
||||||
# Test 1
|
# Test 1
|
||||||
real 2m52.273s
|
real 2m52.273s
|
||||||
user 0m20.374s
|
user 0m20.374s
|
||||||
sys 0m27.800s
|
sys 0m27.800s
|
||||||
|
|
||||||
# Test 2
|
# Test 2
|
||||||
real 2m23.725s
|
real 2m23.725s
|
||||||
user 0m18.019s
|
user 0m18.019s
|
||||||
|
|
10
package.json
10
package.json
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"name": "walk",
|
"name": "walk",
|
||||||
"description": "A node port of python's os.walk",
|
"description": "A node port of python's os.walk",
|
||||||
"url": "http://github.com/coolaj86/node-walk",
|
"url": "http://git.coolaj86.com/coolaj86/fs-walk.js",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"util",
|
"util",
|
||||||
"os",
|
"os",
|
||||||
|
@ -17,9 +17,9 @@
|
||||||
},
|
},
|
||||||
"lib": ".",
|
"lib": ".",
|
||||||
"main": "./lib/walk.js",
|
"main": "./lib/walk.js",
|
||||||
"version": "2.3.9",
|
"version": "2.3.10",
|
||||||
"repository": {
|
"repository": {
|
||||||
"url": "git://github.com/coolaj86/node-walk.git"
|
"url": "https://git.coolaj86.com/coolaj86/fs-walk.js.git"
|
||||||
},
|
},
|
||||||
"licenses": [
|
"licenses": [
|
||||||
{
|
{
|
||||||
|
@ -32,9 +32,9 @@
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"bugs": {
|
"bugs": {
|
||||||
"url": "https://github.com/coolaj86/node-walk/issues"
|
"url": "https://git.coolaj86.com/coolaj86/fs-walk.js/issues"
|
||||||
},
|
},
|
||||||
"homepage": "https://github.com/coolaj86/node-walk",
|
"homepage": "https://git.coolaj86.com/coolaj86/fs-walk.js",
|
||||||
"directories": {
|
"directories": {
|
||||||
"example": "examples",
|
"example": "examples",
|
||||||
"test": "test"
|
"test": "test"
|
||||||
|
|
Loading…
Reference in New Issue