dir-analyzer
Advanced tools
Comparing version 0.0.3 to 0.0.4
@@ -24,3 +24,3 @@ 'use strict'; | ||
this.events = new events.EventEmitter(); | ||
this.stream = new Stream.Readable(); | ||
this.stream = new Stream.Readable({ objectMode: true }); | ||
this.stream.setEncoding('utf8'); | ||
@@ -72,2 +72,4 @@ this.stream._read = () => {} | ||
fileObj.ctime = stat.ctime; | ||
fileObj.dirSplit = fileObj.dir.split(path.sep) | ||
fileObj.depth = fileObj.dirSplit.length | ||
@@ -78,3 +80,3 @@ if (!stat.isDirectory()) { | ||
fileObj.type = 'file'; | ||
this.stream.push(JSON.stringify(fileObj), 'utf8'); | ||
this.stream.push(fileObj, 'utf8'); | ||
} else { | ||
@@ -84,3 +86,3 @@ fileObj.bytes = 0; | ||
fileObj.type = 'folder'; | ||
this.stream.push(JSON.stringify(fileObj),'utf8'); | ||
this.stream.push(fileObj, 'utf8'); | ||
this.toScan.push(filePath) | ||
@@ -87,0 +89,0 @@ } |
{ | ||
"name": "dir-analyzer", | ||
"version": "0.0.3", | ||
"version": "0.0.4", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "dir-analyzer.js", |
@@ -21,2 +21,4 @@ # dir-analyzer | ||
ctime: '2016-07-11T22:58:34.509Z', // Change time | ||
dirSplit: ['c:','some-directory'], // Directory split into an array | ||
depth: 2, // Depth of current file | ||
bytes: 3085, // Size in bytes | ||
@@ -23,0 +25,0 @@ size: '3.01kB', // Size in human readable |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
7516
100
69