lib/extends/_rmdirp.js
function _removeDirectoryContentProm (contents) {

			const content = contents.shift();

			return isDirectoryProm(content).then((exists) => {

				return exists ? new Promise((resolve, reject) => {

					_rmdirp(content, (err) => {
						return err ? reject(err) : resolve();
					});

				}) : new Promise((resolve, reject) => {

					unlink(content, (err) => {
						return err ? reject(err) : resolve();
					});

				});

			}).then(() => {
				return contents.length ? _removeDirectoryContentProm(contents) : Promise.resolve();
			});

		}
function _removeDirectoryContentProm (contents) {

			const content = contents.shift();

			return isDirectoryProm(content).then((exists) => {

				return exists ? new Promise((resolve, reject) => {

					_rmdirp(content, (err) => {
						return err ? reject(err) : resolve();
					});

				}) : new Promise((resolve, reject) => {

					unlink(content, (err) => {
						return err ? reject(err) : resolve();
					});

				});

			}).then(() => {
				return contents.length ? _removeDirectoryContentProm(contents) : Promise.resolve();
			});

		}
function _removeDirectoryContentProm ( contents ) { const content = contents . shift ( ) ; return isDirectoryProm ( content ) . then ( ( exists ) => { return exists ? new Promise ( ( resolve , reject ) => { _rmdirp ( content , ( err ) => { return err ? reject ( err ) : resolve ( ) ; } ) ; } ) : new Promise ( ( resolve , reject ) => { unlink ( content , ( err ) => { return err ? reject ( err ) : resolve ( ) ; } ) ; } ) ; } ) . then ( ( ) => { return contents . length ? _removeDirectoryContentProm ( contents ) : Promise . resolve ( ) ; } ) ; }
methods 
Remove directory's content
@param {Array} contents : directory content
@returns {Promise}: Operation's result
methods Remove directory s content