Comparing version 0.1.7 to 0.1.8
@@ -9,3 +9,3 @@ /** | ||
* | ||
* @version 0.1.7 | ||
* @version 0.1.8 | ||
*/ | ||
@@ -30,2 +30,3 @@ | ||
removeDir = promisify(fs.rmdir), | ||
lstat = promisify(fs.lstat), | ||
undef; | ||
@@ -216,2 +217,13 @@ | ||
/** | ||
* Check whether the given path is a symbolic link | ||
* @param {String} path | ||
* @returns {Vow.promise} | ||
*/ | ||
isSymLink : function(path) { | ||
return lstat(path).then(function(stats) { | ||
return stats.isSymbolicLink(); | ||
}); | ||
}, | ||
/** | ||
* Read the contents of a directory by given path | ||
@@ -218,0 +230,0 @@ * @param {String} path |
{ | ||
"name" : "vow-fs", | ||
"version" : "0.1.7", | ||
"version" : "0.1.8", | ||
"description" : "File I/O by Vow", | ||
@@ -5,0 +5,0 @@ "homepage" : "https://github.com/dfilatov/vow-fs", |
@@ -35,4 +35,5 @@ Vow-fs [![Build Status](https://secure.travis-ci.org/dfilatov/vow-fs.png)](http://travis-ci.org/dfilatov/vow-fs) | ||
####isSocket(path)#### | ||
####isSymLink(path)#### | ||
####listDir(path)#### | ||
####makeDir(path, [mode], [failIfExist=false])#### | ||
####removeDir(path)#### |
@@ -64,5 +64,5 @@ var fs = require('fs'), | ||
test.ok(true); | ||
fs.rmdirSync(dir); | ||
}) | ||
.always(function() { | ||
fs.rmdirSync(dir); | ||
test.done(); | ||
@@ -82,5 +82,5 @@ }); | ||
test.ok(true); | ||
fs.unlink(path.join(TEST_DIR, 'test-file')); | ||
}) | ||
.always(function() { | ||
fs.unlinkSync(path.join(TEST_DIR, 'test-file')); | ||
test.done(); | ||
@@ -118,5 +118,2 @@ }); | ||
function() { | ||
fs.rmdirSync(path.join(TEST_DIR, 'a/b/c')); | ||
fs.rmdirSync(path.join(TEST_DIR, 'a/b')); | ||
fs.rmdirSync(path.join(TEST_DIR, 'a')); | ||
test.ok(true); | ||
@@ -128,2 +125,5 @@ }, | ||
.always(function() { | ||
fs.rmdirSync(path.join(TEST_DIR, 'a/b/c')); | ||
fs.rmdirSync(path.join(TEST_DIR, 'a/b')); | ||
fs.rmdirSync(path.join(TEST_DIR, 'a')); | ||
test.done(); | ||
@@ -130,0 +130,0 @@ }); |
Sorry, the diff of this file is not supported yet
21022
11
600
39
6