Permalink
Browse files

File System: cat function gives metadata and path.

  • Loading branch information...
1 parent 5dd3b21 commit 36b823aeaa7984a1a98eeaddfd87edf023ab6e1b @espadrine committed Jun 13, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 app.js
View
4 app.js
@@ -88,8 +88,8 @@ camp.ajax.on('fs', function (query, end) {
case 'cat':
fs.file(query.path, function (err, file) {
if (err) { data.err = err; end(data); }
- data.type = file.type; // eg, 'text/html'
- data.name = nodepath.basename(query.path);
+ data.meta = file.meta;
+ data.path = query.path;
file.open (function (err, content) {
if (err) { data.err = err; end(data); }
data.content = content;

0 comments on commit 36b823a

Please sign in to comment.