Created
September 30, 2011 21:00
-
-
Save MarkPochert/1254962 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| fs = require 'fs' | |
| crypto = require 'crypto' | |
| filenames = ['file.png','file.txt','server.coffee','server.js'] | |
| md5 = crypto.createHash('md5'); | |
| for value in filenames | |
| s = fs.ReadStream(value) | |
| on_data = (d) -> | |
| md5.update(d) | |
| on_end = () -> | |
| console.log(md5.digest('hex') + ' ' + value) | |
| s.on('data',on_data) | |
| s.on('end',on_end) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 8490ea9d5536609099320b72c1cc4d0b server.js |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment