Skip to content
Myr

Added readFile

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by visionmedia · committed by visionmedia · parent 3830d7e · Browse files · 1 file+11 added−0 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+11 added−0 removed

  • other:+11 added−0 removed

1 file+11 added−0 removed

modified:lib/express.core.js+11 added
327 unmodified lines
328 method : method,329 callback : callback330 })331 }332 },333 334 readFile : function(path, callback, errorCallback) {335 node.fs.cat(path, 'utf8', function(status, content){336 if (status < 0)337 if (errorCallback) errorCallback(status)338 else throw "failed to read file `" + path + "'"339 else 340 callback(content)341 })342 }343 }344 345 get = Express.routeFunctionFor('get')
3 unmodified lines
349 350})()351352get('user/:name/:operation', function(){353 // ["Accept","application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5"],["Accept-Language","en-us"],["Accept-Encoding","gzip, deflate"]354 return param('operation') + 'ing ' + param('name')355})356357get('articles', function(){
12 unmodified lines