<commit_before>var fs = require('graceful-fs')
var path = require('path')

var HAS_MILLIS_RES = hasMillisRes()

// HFS, ext{2,3}, FAT do not, Node.js v0.10 does not
function hasMillisRes () {
  // 550 millis past UNIX epoch
  var d = new Date(550)
  var tmpfile = path.join(require('os').tmpdir(), 'millis-test')
  fs.writeFileSync(tmpfile, 'https://github.com/jprichardson/node-fs-extra/pull/141')
  var fd = fs.openSync(tmpfile, 'r+')
  fs.futimesSync(fd, d, d)
  fs.closeSync(fd)
  return fs.statSync(tmpfile).mtime > 0
}

function timeRemoveMillis (timestamp) {
  if (typeof timestamp === 'number') {
    return Math.floor(timestamp / 1000) * 1000
  } else if (timestamp instanceof Date) {
    return new Date(Math.floor(timestamp.getTime() / 1000) * 1000)
  } else {
    throw new Error('fs-extra: timeRemoveMillis() unknown parameter type')
  }
}

function utimesMillis (path, atime, mtime, callback) {
  if (!HAS_MILLIS_RES) return fs.utimes(path, atime, mtime, callback)
  fs.open(path, 'r+', function (err, fd) {
    if (err) return callback(err)
    fs.futimes(fd, atime, mtime, function (err) {<commit_msg>lib/util/utimes: remove optimization<commit_after>var fs = require('graceful-fs')
var path = require('path')

var HAS_MILLIS_RES = hasMillisRes()

// HFS, ext{2,3}, FAT do not, Node.js v0.10 does not
function hasMillisRes () {
  // 550 millis past UNIX epoch
  var d = new Date(550)
  var tmpfile = path.join(require('os').tmpdir(), 'millis-test')
  fs.writeFileSync(tmpfile, 'https://github.com/jprichardson/node-fs-extra/pull/141')
  var fd = fs.openSync(tmpfile, 'r+')
  fs.futimesSync(fd, d, d)
  fs.closeSync(fd)
  return fs.statSync(tmpfile).mtime > 0
}

function timeRemoveMillis (timestamp) {
  if (typeof timestamp === 'number') {
    return Math.floor(timestamp / 1000) * 1000
  } else if (timestamp instanceof Date) {
    return new Date(Math.floor(timestamp.getTime() / 1000) * 1000)
  } else {
    throw new Error('fs-extra: timeRemoveMillis() unknown parameter type')
  }
}

function utimesMillis (path, atime, mtime, callback) {
  // if (!HAS_MILLIS_RES) return fs.utimes(path, atime, mtime, callback)
  fs.open(path, 'r+', function (err, fd) {
    if (err) return callback(err)
    fs.futimes(fd, atime, mtime, function (err) {
{'fraction_non_alphanumeric': 0.1508849557522124, 'fraction_numerical': 0.02743362831858407, 'mean_word_length': 4.162100456621005, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 2, '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': '1955645', 'n_tokens_mistral': 864, 'n_tokens_neox': 819, 'n_words': 206}