You are here

protected function ContentHasher::getSourceContentHashes in Tome 8

Gets the content hashes from the source (filesystem).

Return value

array An associative array mapping content names to hashes.

1 call to ContentHasher::getSourceContentHashes()
ContentHasher::getChangelist in modules/tome_sync/src/ContentHasher.php
Get a list of changed content.

File

modules/tome_sync/src/ContentHasher.php, line 90

Class

ContentHasher
Hashes normalized content in the database.

Namespace

Drupal\tome_sync

Code

protected function getSourceContentHashes() {
  $source_content_hashes = [];
  foreach ($this->storage
    ->listAll() as $name) {
    $source_content_hashes[$name] = sha1_file($this->storage
      ->getFilePath($name));
  }
  return $source_content_hashes;
}