Comparing version 0.1.3 to 0.1.5
21
index.js
@@ -13,3 +13,3 @@ var path = require( 'path' ), | ||
standardMethods = 'chmod chown createReadStream createWriteStream exists lchmod lchown lstat readdir readFile readlink realpath rmdir stat truncate unlink utimes unwatchFile watch watchFile'.split( ' ' ); | ||
standardMethods = 'chmod chown createReadStream createWriteStream lchmod lchown lstat readdir readFile readlink realpath rmdir stat truncate unlink utimes unwatchFile watch watchFile'.split( ' ' ); | ||
fileDescriptorMethods = 'close fchmod fchown fstat fsync ftruncate futimes read'.split( ' ' ); | ||
@@ -656,4 +656,6 @@ | ||
sander.rimraf = function () { | ||
var target = resolve( arguments ); | ||
return new Promise( function ( fulfil, reject ) { | ||
rimraf( resolve( arguments ), function ( err ) { | ||
rimraf( target, function ( err ) { | ||
if ( err ) { | ||
@@ -672,2 +674,17 @@ reject( err ); | ||
// sander.exists, sander.existsSync | ||
sander.exists = function () { | ||
var target = resolve( arguments ); | ||
return new Promise( function ( fulfil ) { | ||
fs.exists( target, function ( exists ) { | ||
fulfil( exists ); | ||
}); | ||
}); | ||
}; | ||
sander.existsSync = function () { | ||
return fs.existsSync( resolve( arguments ) ); | ||
}; | ||
sander.Promise = Promise; | ||
@@ -674,0 +691,0 @@ |
@@ -5,3 +5,3 @@ { | ||
"author": "Rich Harris", | ||
"version": "0.1.3", | ||
"version": "0.1.5", | ||
"dependencies": { | ||
@@ -8,0 +8,0 @@ "es6-promise": "^1.0.0", |
23938
620