Comparing version 0.1.1 to 0.2.0
# Release notes for `m-io` | ||
<a name="current-release"></a> | ||
# Version 0.2.0 (Mon, 19 Dec 2016 23:32:09 GMT) | ||
* [3014ec6](https://github.com/nknapp/m-io/commit/3014ec6) Add "list" function to "fs.js" module - Nils Knappmeier | ||
# Version 0.1.1 (Fri, 11 Nov 2016 14:09:16 GMT) | ||
@@ -5,0 +11,0 @@ |
13
fs.js
@@ -30,3 +30,14 @@ /*! | ||
}, | ||
/** | ||
* Custom implementation of [q-io/fs#list](http://documentup.com/kriskowal/q-io#listpath) | ||
* to avoid dependency on q-io | ||
* @param {string} directoryPath the base path | ||
* @returns {Promise<string[]>} a promise for the collector, that is fulfilled with a list of directory entries | ||
*/ | ||
list: function list (directoryPath) { | ||
return Q.ninvoke(fs, 'readdir', directoryPath) | ||
}, | ||
/** | ||
* Replacement for [q-io/fs#makeTree](http://documentup.com/kriskowal/q-io#maketreepath-mode) | ||
@@ -39,5 +50,7 @@ * @param {string} aPath the directory to be created | ||
}, | ||
removeTree: function removeTree (aPath) { | ||
return Q.nfcall(require('rimraf'), aPath) | ||
}, | ||
/** | ||
@@ -44,0 +57,0 @@ * Replacement for [q-io/fs#read](http://documentup.com/kriskowal/q-io#readpath-options) |
{ | ||
"name": "m-io", | ||
"version": "0.1.1", | ||
"version": "0.2.0", | ||
"description": "(Incomplete) replacement for q-io", | ||
@@ -5,0 +5,0 @@ "repository": { |
@@ -101,6 +101,7 @@ # m-io | ||
### fs | ||
## fs | ||
* [fs](#module_fs) | ||
* [.listTree(directoryPath, filter)](#module_fs.listTree) ⇒ <code>Promise.<Array.<string>></code> | ||
* [.list(directoryPath)](#module_fs.list) ⇒ <code>Promise.<Array.<string>></code> | ||
* [.makeTree(aPath, [mode])](#module_fs.makeTree) | ||
@@ -111,3 +112,3 @@ * [.read(aPath)](#module_fs.read) | ||
#### .listTree(directoryPath, filter) ⇒ <code>Promise.<Array.<string>></code> | ||
### .listTree(directoryPath, filter) ⇒ <code>Promise.<Array.<string>></code> | ||
Custom implementation of [q-io/fs#listTree](http://documentup.com/kriskowal/q-io#listtreepath-guardpath-stat) | ||
@@ -124,5 +125,18 @@ to avoid dependency on q-io | ||
<a name="module_fs.list"></a> | ||
### .list(directoryPath) ⇒ <code>Promise.<Array.<string>></code> | ||
Custom implementation of [q-io/fs#list](http://documentup.com/kriskowal/q-io#listpath) | ||
to avoid dependency on q-io | ||
**Kind**: static method of <code>[fs](#module_fs)</code> | ||
**Returns**: <code>Promise.<Array.<string>></code> - a promise for the collector, that is fulfilled with a list of directory entries | ||
| Param | Type | Description | | ||
| --- | --- | --- | | ||
| directoryPath | <code>string</code> | the base path | | ||
<a name="module_fs.makeTree"></a> | ||
#### .makeTree(aPath, [mode]) | ||
### .makeTree(aPath, [mode]) | ||
Replacement for [q-io/fs#makeTree](http://documentup.com/kriskowal/q-io#maketreepath-mode) | ||
@@ -139,3 +153,3 @@ | ||
#### .read(aPath) | ||
### .read(aPath) | ||
Replacement for [q-io/fs#read](http://documentup.com/kriskowal/q-io#readpath-options) | ||
@@ -142,0 +156,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
14373
140
173