<commit_before>// Copyright 2020, University of Colorado Boulder

/**
 * Deletes a path recursively
 *
 * @author <NAME> <<EMAIL>>
 */

'use strict';

const rimraf = require( 'rimraf' );
const winston = require( 'winston' );

/**
 * Deletes a path recursively
 * @public
 *
 * @param {string} path - The path to delete recursively
 * @returns {Promise}
 */
module.exports = function( path ) {
  winston.info( `Deleting directory ${path}` );

  return new Promise( ( resolve, reject ) => {
    rimraf( path, err => {
      if ( err ) {
        reject( `rimraf: ${err}` );
      }
      else {
        resolve();
      }
    } );
  } );
};<commit_msg>Switching to rm exec for removeDirectory<commit_after>// Copyright 2020, University of Colorado Boulder

/**
 * Deletes a path recursively
 *
 * @author <NAME> <<EMAIL>>
 */

'use strict';

const execute = require( './execute' );
const winston = require( 'winston' );

/**
 * Deletes a path recursively
 * @public
 *
 * @param {string} path - The path to delete recursively
 * @returns {Promise}
 */
module.exports = function( path ) {
  winston.info( `Deleting directory ${path}` );

  return execute( 'rm', [ '-Rf', path ], '../' );
};
{'fraction_non_alphanumeric': 0.16526138279932545, 'fraction_numerical': 0.006745362563237774, 'mean_word_length': 3.051194539249147, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3716942', 'n_tokens_mistral': 392, 'n_tokens_neox': 376, 'n_words': 117}