<commit_before>var path = require('path');
var fs = require('fs');

/**
 * Test whether or not the given path exists by checking with the file system
 *
 * @param {String} filepath
 */
module.exports.existsStatSync = function(filepath) {
  try {
    return fs.statSync(filepath);
  } catch (err) {
    return false;
  }
};

/**
 * Processing path to the source directory from destination directory
 *
 * @param {String} srcPath
 * @param {String} dest
 * @param {Object} opts
 */
module.exports.fromDestToSrcPath = function(dest, destOrig, opts) {
  if (opts.base) {
    dest = path.join(opts.base, dest);
  }

  return dest.replace(/\\/g, '/');
};

/**
 * Processing path to the destination directory from source directory
 *
 * @param {String} srcPath
 * @param {String} dest
 * @param {Object} opts
 */
module.exports.fromSrcToDestPath = function(src, dest, opts) {
  if (opts.base) {
    src = path.relative(opts.base, src);
  }

  return path.join(dest, src).replace(/\\/g, '/');
};

/**
 * Expanding of the directories in path
 *
 * @param {String} filepath
 */
module.exports.expandDirTree = function(filepath) {
  filepath = filepath.split('/');
  var arr = [filepath[0]];
  filepath.reduce(function(sum, current) {
    var next = path.join(sum, current).replace(/\\/g, '/');
    arr.push(next);
    return next;
  });

  return arr;
};

/**
 * Compare update time of two files
 *
 * @param {Object} srcTime
 * @param {Object} destTime
 */
module.exports.compareTime = function(srcTime, destTime) {
  return srcTime.ctime.getTime() <= destTime.ctime.getTime();
};<commit_msg>fix conditions<commit_after>var path = require('path');
var fs = require('fs');

/**
 * Test whether or not the given path exists by checking with the file system
 *
 * @param {String} filepath
 */
module.exports.existsStatSync = function(filepath) {
  try {
    return fs.statSync(filepath);
  } catch (err) {
    return false;
  }
};

/**
 * Processing path to the source directory from destination directory
 *
 * @param {String} srcPath
 * @param {String} dest
 * @param {Object} opts
 */
module.exports.fromDestToSrcPath = function(dest, destOrig, opts) {
  if (opts.base) {
    dest = path.join(opts.base, dest);
  }

  return dest.replace(/\\/g, '/');
};

/**
 * Processing path to the destination directory from source directory
 *
 * @param {String} srcPath
 * @param {String} dest
 * @param {Object} opts
 */
module.exports.fromSrcToDestPath = function(src, dest, opts) {
  if (opts.base) {
    src = path.relative(opts.base, src);
  }

  return path.join(dest, src).replace(/\\/g, '/');
};

/**
 * Expanding of the directories in path
 *
 * @param {String} filepath
 */
module.exports.expandDirTree = function(filepath) {
  filepath = filepath.split('/');
  var arr = [filepath[0]];
  filepath.reduce(function(sum, current) {
    var next = path.join(sum, current).replace(/\\/g, '/');
    arr.push(next);
    return next;
  });

  return arr;
};

/**
 * Compare update time of two files
 *
 * @param {Object} srcTime
 * @param {Object} destTime
 */
module.exports.compareTime = function(srcTime, destTime) {
  return srcTime.ctime.getTime() < destTime.ctime.getTime();
};
{'fraction_non_alphanumeric': 0.1607706885660139, 'fraction_numerical': 0.0006317119393556538, 'mean_word_length': 3.550287356321839, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, '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': '2426659', 'n_tokens_mistral': 1046, 'n_tokens_neox': 1027, 'n_words': 273}