lib/delta/local-delta.js
function createNode(name, parent, stat, parentNodeId, callback) {
  if(utility.hasInvalidChars(name)) {
    logger.info('Ignoring file \'' + name + '\' because filename contains invalid chars');
    return callback(undefined);
  }

  var newNode = {
    directory: stat.isDirectory(),
    name: name,
    parent: parent,
    localActions: {create: {immediate: false, actionInitialized: new Date()}},
    localParent: parentNodeId,
    ino: stat.ino
  }

  syncDb.create(newNode, (err, createdNode) => {
    callback(createdNode._id, undefined);
  });
}
function createNode(name, parent, stat, parentNodeId, callback) {
  if(utility.hasInvalidChars(name)) {
    logger.info('Ignoring file \'' + name + '\' because filename contains invalid chars');
    return callback(undefined);
  }

  var newNode = {
    directory: stat.isDirectory(),
    name: name,
    parent: parent,
    localActions: {create: {immediate: false, actionInitialized: new Date()}},
    localParent: parentNodeId,
    ino: stat.ino
  }

  syncDb.create(newNode, (err, createdNode) => {
    callback(createdNode._id, undefined);
  });
}
function createNode ( name , parent , stat , parentNodeId , callback ) { if ( utility . hasInvalidChars ( name ) ) { logger . info ( 'Ignoring file \'' + name + '\' because filename contains invalid chars' ) ; return callback ( undefined ) ; } var newNode = { directory : stat . isDirectory ( ) , name : name , parent : parent , localActions : { create : { immediate : false , actionInitialized : new Date ( ) } } , localParent : parentNodeId , ino : stat . ino } syncDb . create ( newNode , ( err , createdNode ) => { callback ( createdNode . _id , undefined ) ; } ) ; }
Creates a node in the database

@param {string} name - name of the node
@param {string} parent - parent path of the node
@param {Object} stat - fs.lstat result for the node
@param {string} parentNodeId - local parent id
@param {Function} callback - callback function
@returns {void} - no return value
Creates a node in the database