mirror of https://github.com/lukechilds/node.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
29 lines
775 B
29 lines
775 B
var fstream = require("../fstream.js")
|
|
var path = require("path")
|
|
|
|
var r = fstream.Reader({ path: path.dirname(__dirname)
|
|
, filter: function () {
|
|
return !this.basename.match(/^\./)
|
|
}
|
|
})
|
|
|
|
console.error(r instanceof fstream.Reader)
|
|
console.error(r instanceof require("stream").Stream)
|
|
console.error(r instanceof require("events").EventEmitter)
|
|
console.error(r.on)
|
|
|
|
r.on("stat", function () {
|
|
console.error("a %s !!!\t", r.type, r.path)
|
|
})
|
|
|
|
r.on("entries", function (entries) {
|
|
console.error("\t" + entries.join("\n\t"))
|
|
})
|
|
|
|
r.on("entry", function (entry) {
|
|
console.error("a %s !!!\t", entry.type, entry.path)
|
|
})
|
|
|
|
r.on("end", function () {
|
|
console.error("IT'S OVER!!")
|
|
})
|
|
|