Skip to content
This repository has been archived by the owner on Apr 6, 2021. It is now read-only.

Commit

Permalink
Add PROPFIND for individual file stat
Browse files Browse the repository at this point in the history
  • Loading branch information
creationix committed May 15, 2012
1 parent e493574 commit 8563c51
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions http-adapter/restful.js
Expand Up @@ -277,6 +277,13 @@ module.exports = function setup(mount, vfs) {
});
});
} // end POST commands
else if (req.method === "PROPFIND") {
vfs.stat(path, {}, function (err, meta) {
if (err) return abort(err);
res.setHeader("Content-Type", "application/json");
res.end(JSON.stringify(meta) + "\n");
});
}
else {
return abort("Unsupported HTTP method", 501);
}
Expand Down

0 comments on commit 8563c51

Please sign in to comment.