lib/fs.js
function(index)
  {
    //Check the index
    if(index >= files.length)
    {
      //Do the callback
      return cb(null);
    }

    //Get the file to remove
    var file = files[index];

    //Remove the file
    fs.unlink(file, function(error)
    {
      //Check the error
      if(error)
      {
        //Check the error code
        if(error.code !== 'ENOENT')
        {
          //Do the callback with the error
          return cb(error);
        }
      }

      //Continue with the next file
      return remove_file(index + 1);
    });
  }
function(index)
  {
    //Check the index
    if(index >= files.length)
    {
      //Do the callback
      return cb(null);
    }

    //Get the file to remove
    var file = files[index];

    //Remove the file
    fs.unlink(file, function(error)
    {
      //Check the error
      if(error)
      {
        //Check the error code
        if(error.code !== 'ENOENT')
        {
          //Do the callback with the error
          return cb(error);
        }
      }

      //Continue with the next file
      return remove_file(index + 1);
    });
  }
function ( index ) { //Check the index if ( index >= files . length ) { //Do the callback return cb ( null ) ; } //Get the file to remove var file = files [ index ] ; //Remove the file fs . unlink ( file , function ( error ) { //Check the error if ( error ) { //Check the error code if ( error . code !== 'ENOENT' ) { //Do the callback with the error return cb ( error ) ; } } //Continue with the next file return remove_file ( index + 1 ) ; } ) ; }
Remove file method
Remove file method