function addDir (dir, stat) {
  var mtime = stat.mtime.getTime()
  if (!map[dir] && list.length <= maxListSize) {
    map[dir] = mtime
    list.push(dir)
    clearTimeout(sortList.timer)
    sortList.timer = setTimeout(sortList, checkInterval)
    fs.readdir(dir, function (e, files) {
      if (!e) {
        files.forEach(function (file) {
          watch(dir + '/' + file)
        })
      }
    })
  }
}
function addDir (dir, stat) {
  var mtime = stat.mtime.getTime()
  if (!map[dir] && list.length <= maxListSize) {
    map[dir] = mtime
    list.push(dir)
    clearTimeout(sortList.timer)
    sortList.timer = setTimeout(sortList, checkInterval)
    fs.readdir(dir, function (e, files) {
      if (!e) {
        files.forEach(function (file) {
          watch(dir + '/' + file)
        })
      }
    })
  }
}
function addDir ( dir , stat ) { var mtime = stat . mtime . getTime ( ) if ( ! map [ dir ] && list . length <= maxListSize ) { map [ dir ] = mtime list . push ( dir ) clearTimeout ( sortList . timer ) sortList . timer = setTimeout ( sortList , checkInterval ) fs . readdir ( dir , function ( e , files ) { if ( ! e ) { files . forEach ( function ( file ) { watch ( dir + '/' + file ) } ) } } ) } }
Add a watchable directory to the map and list of directories we're watching.
Add a watchable directory to the map and list of directories we re watching .