summaryrefslogtreecommitdiff
path: root/tools/node_modules/eslint/node_modules/flat-cache/del.js
blob: 542baac70a0c78bf0cd9a65669f620cb55e516d7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
var rimraf = require( 'rimraf' ).sync;
var fs = require( 'graceful-fs' );

module.exports = function del( file ) {
  if ( fs.existsSync( file ) ) {
    //if rimraf doesn't throw then the file has been deleted or didn't exist
    rimraf( file, {
      glob: false
    } );
    return true;
  }
  return false;
};