private function getLastMod($dirPath)
  {
    $dirInfo = new \SplFileInfo($dirPath);
    $lastMod = $dirInfo->getMTime();

    // Check files and subdirectories
    $iter = new \FilesystemIterator($dirPath);
    foreach ($iter as $fileInfo) {

      if ($fileInfo->isDir()) {
        $mtime = self::getLastMod($fileInfo->getPathname());
      }
      else {
        $mtime = $fileInfo->getMTime();
      }

      if ($mtime > $lastMod) {
        $lastMod = $mtime;
      }
    }

    return $lastMod;
  }