docs: async function reprime(dir) {
    // start the new files and mtimes caches (eventually to replace the ones on the object)
    const files = {};
    const mtimes = {};
  
    // define resursive function to load directory contents
    let totalSize = 0;
    const load = dirName => Promise.map(sander.readdir(dirName), async _name => {
      const name = path.resolve(dirName, _name);
      const relativeName = path.relative(dir._absolutePath, name);
  
      // find out when the file last changed on disk
      const stat = await sander.lstat(name);
      const diskMtime = stat.mtime.getTime();
  
      // find out when our cached copy last changed (if any)
      const lastKnownMtime = dir._mtimes.get(relativeName);
  
      if (stat.isFile()) {
        // skip this file if it's excluded by the matcher
        if (!dir._match(relativeName)) return;
  
        // get the cached content (if any)
        const cachedContent = dir._files.get(relativeName);
  
        // decide what we're going to go with (the one from the cache or the one on disk)
        let content;
        let mtime;
        // console.log('\nfile', name);
        // console.log('  lastKnownMtime', lastKnownMtime);
        // console.log('       diskMtime', diskMtime);
        // console.log();
  
        if (cachedContent && diskMtime <= lastKnownMtime) {
          // cached file exists and is new enough; use it
          // console.log('cache hit!!', relativeName);
          mtime = lastKnownMtime;
          content = cachedContent;
        }
        else {
          // no cached file (or too old); read the file from disk
          // console.log('cache miss:', relativeName);
          mtime = diskMtime;
          content = await sander.readFile(name);
        }
  
        // verify adding this file doesn't take us over the filesize limit
        totalSize += content.length;
        if (totalSize > dir._limit) {
          throw new Error(
            `Contents of directory exceed ${prettyBytes(dir._limit)} limit: ${dir._absolutePath}`
            );
        }
  
        // update the new caches with this file's content and mtime
        files[relativeName] = content;
        mtimes[relativeName] = mtime;
      }
  
      // if it's a directory, recurse into it
      else if (stat.isDirectory()) await load(name);
  
      // if it's something weird, error out
      else throw new Error(`Not a file or directory: ${name}`);
    });
  
    // start recursive load
    try {
      await load(dir._absolutePath);
    }
    catch (error) {
      // create the base directory if it doesn't exist
      if (error.code === 'ENOENT' && error.path === dir._absolutePath) {
        await sander.mkdir(dir._absolutePath);
      }
      else throw error;
    }
  
    // save the new caches and note that the directory has been primed
    /* eslint-disable no-param-reassign */
    dir._files = Immutable.Map(files);
    dir._mtimes = Immutable.Map(mtimes);
    dir._primed = true;
    /* eslint-enable no-param-reassign */
  }