Skip to content

new file system API (read, apply, create, delete) #144

Merged
merged 6 commits into from Sep 10, 2012

2 participants

@jankeromnes
The Garden member

good times bro

@espadrine espadrine commented on an outdated diff Aug 29, 2012
@@ -72,6 +72,16 @@ backup:
@cp -r meta/ web$(DATE)/
@echo "Copied web/ and meta/ to new web$(DATE)/ backup folder."
+gc:
+ @# WARNING: If web/ doesn't exist, meta/ will be deleted entirely.
@espadrine
The Garden member
espadrine added a note Aug 29, 2012

Could you please put a comment about what that does?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@espadrine espadrine and 1 other commented on an outdated diff Aug 30, 2012
+ });
+ } else {
+ // get the folder's subfiles
+ file.files(function (err, files) {
+ if (err) { data.err = err; end(data); return; }
+ var counter = files.length;
+ if (counter <= 0) { end(data); return; }
+ for (var i = 0; i < files.length; i++) {
+ // only recurse on subfolders
+ var subdepth = files[i].meta.type === 'dir' ? depth - 1 : -1;
+ read(files[i].path, subdepth, function(d) {
+ if (d.err) { data.err = d.err; }
+ data.files.push.apply(data.files, d.files);
+ counter--;
+ if (counter <= 0) end(data);
+}); } }); } }); };
@espadrine
The Garden member
espadrine added a note Aug 30, 2012

erk wtf?

Edit: I assume this is an artful attempt at imitating line noise? :)

@jankeromnes
The Garden member
jankeromnes added a note Aug 30, 2012

An attempt at something a little original :-) I can remove it if you don't like it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@espadrine espadrine commented on the diff Aug 30, 2012
lib/profiler.js
{doc: "Uptime", data: uptime, unit: "seconds"},
- {doc: "Uptime", data: uptime / (3600 * 24), unit: "days"},
@espadrine
The Garden member
espadrine added a note Aug 30, 2012

Having days can be nice, can't it?

@jankeromnes
The Garden member
jankeromnes added a note Aug 30, 2012

Go to the profiler and be horrified that days is an information shown twice.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@jankeromnes
The Garden member

@espadrine looking all good now! Also look at garden/plugs pull request please :)

@espadrine espadrine merged commit db0086b into garden:master Sep 10, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.