Comparing version 0.3.0 to 0.3.1
/** | ||
* @module vow-fs | ||
* @author Filatov Dmitry <dfilatov@yandex-team.ru> | ||
* @version 0.3.0 | ||
* @version 0.3.1 | ||
* @license | ||
@@ -18,2 +18,3 @@ * Dual licensed under the MIT and GPL licenses: | ||
uuid = require('node-uuid'), | ||
glob = require('glob'), | ||
slice = Array.prototype.slice, | ||
@@ -27,3 +28,8 @@ promisify = function(nodeFn) { | ||
}); | ||
nodeFn.apply(fs, args); | ||
try { | ||
nodeFn.apply(fs, args); | ||
} | ||
catch(err) { | ||
defer.reject(err); | ||
} | ||
return defer.promise(); | ||
@@ -345,2 +351,10 @@ }; | ||
/** | ||
* Matches files using the patterns, see https://github.com/isaacs/node-glob for details | ||
* @param {String} pattern to be matched | ||
* @param {Object} [options] options | ||
* @returns {vow:Promise} | ||
*/ | ||
glob : promisify(glob), | ||
options : function(opts) { | ||
@@ -347,0 +361,0 @@ if(typeof opts.openFileLimit !== 'undefined') { |
{ | ||
"name" : "vow-fs", | ||
"version" : "0.3.0", | ||
"version" : "0.3.1", | ||
"description" : "File I/O by Vow", | ||
@@ -12,3 +12,3 @@ "homepage" : "https://github.com/dfilatov/vow-fs", | ||
}], | ||
"repository":{ | ||
"repository": { | ||
"type" : "git", | ||
@@ -19,9 +19,10 @@ "url" : "http://github.com/dfilatov/vow-fs.git" | ||
"node-uuid" : "1.4.0", | ||
"vow-queue" : "0.1.0" | ||
"vow-queue" : "0.1.0", | ||
"glob" : "3.2.8" | ||
}, | ||
"peerDependencies": { | ||
"vow" : ">= 0.4.0" | ||
"vow" : "0.4.x" | ||
}, | ||
"devDependencies": { | ||
"vow" : ">= 0.4.0", | ||
"vow" : "0.4.x", | ||
"nodeunit" : "", | ||
@@ -28,0 +29,0 @@ "istanbul" : "" |
@@ -1,5 +0,5 @@ | ||
Vow-fs [![Build Status](https://secure.travis-ci.org/dfilatov/vow-fs.png)](http://travis-ci.org/dfilatov/vow-fs) | ||
vow-fs [![NPM version](https://badge.fury.io/js/vow-fs.png)](http://badge.fury.io/js/vow-fs) [![Build Status](https://secure.travis-ci.org/dfilatov/vow-fs.png)](http://travis-ci.org/dfilatov/vow-fs) | ||
====== | ||
[Vow](https://github.com/dfilatov/jspromise)-based file I/O for Node.js | ||
[Vow](https://github.com/dfilatov/vow)-based file I/O for Node.js | ||
@@ -12,3 +12,3 @@ Requirements | ||
--------------- | ||
You can install Vow-fs using Node Package Manager (npm): | ||
You can install vow-fs using Node Package Manager (npm): | ||
@@ -15,0 +15,0 @@ npm install vow-fs |
42
test.js
var vfs = require('./lib/fs'); | ||
vfs.makeDir('blocks-desktop/i18n/_keyset').then(function() { | ||
console.log('ok'); | ||
}, function(err) { | ||
console.log(err); | ||
}) | ||
vfs.makeDir('blocks-desktop/i18n/_keyset').then(function() { | ||
console.log('ok'); | ||
}, function(err) { | ||
console.log(err); | ||
}) | ||
vfs.makeDir('blocks-desktop/i18n/_keyset').then(function() { | ||
console.log('ok'); | ||
}, function(err) { | ||
console.log(err); | ||
}) | ||
vfs.makeDir('blocks-desktop/i18n/_keyset').then(function() { | ||
console.log('ok'); | ||
}, function(err) { | ||
console.log(err); | ||
}) | ||
vfs.makeDir('blocks-desktop/i18n/_keyset').then(function() { | ||
console.log('ok'); | ||
}, function(err) { | ||
console.log(err); | ||
}) | ||
vfs.makeDir('blocks-desktop/i18n/_keyset').then(function() { | ||
console.log('ok'); | ||
}, function(err) { | ||
console.log(err); | ||
}) | ||
vfs.makeDir('blocks-desktop/i18n/_keyset').then(function() { | ||
console.log('ok'); | ||
}, function(err) { | ||
console.log(err); | ||
vfs.glob('*.js').then(function(files) { | ||
console.log(files); | ||
}) |
28984
4
762
+ Addedglob@3.2.8
+ Addedglob@3.2.8(transitive)
+ Addedinherits@2.0.4(transitive)
+ Addedlru-cache@2.7.3(transitive)
+ Addedminimatch@0.2.14(transitive)
+ Addedsigmund@1.0.1(transitive)