Ohm-Management - Projektarbeit B-ME
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

del.js 312B

12345678910111213
  1. var rimraf = require( 'rimraf' ).sync;
  2. var fs = require( 'graceful-fs' );
  3. module.exports = function del( file ) {
  4. if ( fs.existsSync( file ) ) {
  5. //if rimraf doesn't throw then the file has been deleted or didn't exist
  6. rimraf( file, {
  7. glob: false
  8. } );
  9. return true;
  10. }
  11. return false;
  12. };