code: function(callback) {
      //process first all directories and then all files.
      async.mapSeries(['getDirectories', 'getFiles'], (nodeSource, cbMap) => {
        syncDb[nodeSource]((err, nodes) => {
          async.eachSeries(nodes, (node, cb) => {
  
            // If a node has to be redownloaded do not delete it remotely
            // See: https://github.com/gyselroth/balloon-node-sync/issues/17
            if(node.downloadOriginal) return cb();
  
            var nodePath = utility.joinPath(node.parent, node.name);
  
            process.nextTick(() => {
              var nodePath = utility.joinPath(node.parent, node.name);
  
              if(fsWrap.existsSync(nodePath) === false) {
                //Node doesn't exist localy -> delete it remotely
                deleteNode(node, false, cb);
              } else {
                try {
                  var stat = fsWrap.lstatSync(nodePath);
                } catch(e) {
                  logger.warning('findDeletedNodes got lstat error on node', {category: 'sync-local-delta', nodePath, code: e.code});
                  throw new BlnDeltaError(e.message);
                }
  
                if(stat.ino === node.ino) {
                  //node still exists at given path
                  return cb();
                } else {
                  deleteNode(node, true, cb);
                }
              }
            });
          }, cbMap);
        });
      }, callback);
    }
docs: Scans the database and checks for deleted nodes.
  Sets the necessary localActions in the database.
  
  @param {Function} callback - callback function
  @returns {void} - no return value