original_string: public static function hashAllFiles($path)
      {
          $flags = \RecursiveDirectoryIterator::SKIP_DOTS;
          $files = [];
  
          /** @var UniformResourceLocator $locator */
          $locator = Grav::instance()['locator'];
          if ($locator->isStream($path)) {
              $directory = $locator->getRecursiveIterator($path, $flags);
          } else {
              $directory = new \RecursiveDirectoryIterator($path, $flags);
          }
  
          $iterator = new \RecursiveIteratorIterator($directory, \RecursiveIteratorIterator::SELF_FIRST);
  
          foreach ($iterator as $file) {
              $files[] = $file->getPathname() . '?'. $file->getMTime();
          }
  
          return md5(serialize($files));
      }
code: public static function hashAllFiles($path)
      {
          $flags = \RecursiveDirectoryIterator::SKIP_DOTS;
          $files = [];
  
          /** @var UniformResourceLocator $locator */
          $locator = Grav::instance()['locator'];
          if ($locator->isStream($path)) {
              $directory = $locator->getRecursiveIterator($path, $flags);
          } else {
              $directory = new \RecursiveDirectoryIterator($path, $flags);
          }
  
          $iterator = new \RecursiveIteratorIterator($directory, \RecursiveIteratorIterator::SELF_FIRST);
  
          foreach ($iterator as $file) {
              $files[] = $file->getPathname() . '?'. $file->getMTime();
          }
  
          return md5(serialize($files));
      }
code_tokens: public static function hashAllFiles ( $ path ) { $ flags = \ RecursiveDirectoryIterator :: SKIP_DOTS ; $ files = [ ] ; /** @var UniformResourceLocator $locator */ $ locator = Grav :: instance ( ) [ 'locator' ] ; if ( $ locator -> isStream ( $ path ) ) { $ directory = $ locator -> getRecursiveIterator ( $ path , $ flags ) ; } else { $ directory = new \ RecursiveDirectoryIterator ( $ path , $ flags ) ; } $ iterator = new \ RecursiveIteratorIterator ( $ directory , \ RecursiveIteratorIterator :: SELF_FIRST ) ; foreach ( $ iterator as $ file ) { $ files [ ] = $ file -> getPathname ( ) . '?' . $ file -> getMTime ( ) ; } return md5 ( serialize ( $ files ) ) ; }
docstring: Recursively md5 hash all files in a path
  
  @param string $path
  @return string
docstring_tokens: Recursively md5 hash all files in a path