lib/probes/FileSyncProbe.js
function(args, callback) {
      // Make sure the ID exists
      var t = this, model = args.model;
      if (!model || !model.id) {
        return callback({msg:'SyncProbe create - Data model with ID not present'});
      }

      // Make sure the file doesn't already exist
      t.getFullPath(model.id, function(error, response) {
        if (error) {
          return callback(error);
        }

        if (response.stats) {
          return callback({msg:'Document with this ID already exists'});
        }

        // Forward to the update control
        t.update_control(args, callback);
      });
    }
function(args, callback) {
      // Make sure the ID exists
      var t = this, model = args.model;
      if (!model || !model.id) {
        return callback({msg:'SyncProbe create - Data model with ID not present'});
      }

      // Make sure the file doesn't already exist
      t.getFullPath(model.id, function(error, response) {
        if (error) {
          return callback(error);
        }

        if (response.stats) {
          return callback({msg:'Document with this ID already exists'});
        }

        // Forward to the update control
        t.update_control(args, callback);
      });
    }
function ( args , callback ) { // Make sure the ID exists var t = this , model = args . model ; if ( ! model || ! model . id ) { return callback ( { msg : 'SyncProbe create - Data model with ID not present' } ) ; } // Make sure the file doesn't already exist t . getFullPath ( model . id , function ( error , response ) { if ( error ) { return callback ( error ) ; } if ( response . stats ) { return callback ( { msg : 'Document with this ID already exists' } ) ; } // Forward to the update control t . update_control ( args , callback ) ; } ) ; }
Documentation for these methods in SyncProbe
Documentation for these methods in SyncProbe