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
| def list(path: String): Future[Seq[File]] = { | |
| val files = new java.io.File(path).listFiles.filter(a => !a.isHidden()) | |
| Future.value(files.toSeq) | |
| } | |
| def walk(path: String): Future[Seq[File]] = { | |
| list(path) flatMap { entries => | |
| val children: Seq[Future[Seq[File]]] = entries map { entry => { | |
| if (entry.isDirectory) |
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
| // add comment function | |
| function addComment(req, res) { | |
| PostModel.findById(req.params.postId, function (err, foundPost) { | |
| if(err) { | |
| return handleError(err) | |
| } | |
| var commentObj = { | |
| user: req.session.userId, |
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
| var azure = require ('azure') | |
| , http = require ('http') | |
| , conf = require ('/conf'); | |
| var blobService = azure.createBlobService(conf.azure.storageAccount, conf.azure.storageAccessKey); | |
| http.get( 'http://1800hocking.files.wordpress.com/2011/07/hi-ohio-logo.jpg', function( response ) { | |
| var contentLength = Number(response.headers['content-length']); |