calculateHash function

Digest calculateHash(
  1. String path
)

Calculates the sha256 hash of a file's content.

This is likely to be an expensive operation if the file is large.

You can use this method to check if a file has changes since the last time you took the file's hash.

Throws FileNotFoundException if path doesn't exist. Throws NotAFileException if path is not a file.

Implementation

Digest calculateHash(String path) => waitForEx(
    // ignore: discarded_futures
    core.calculateHash(path));