Computes the hash code of the {@code file} using {@code hashFunction}. @param file the file to read @param hashFunction the hash function to use to hash the data @return the {@link HashCode} of all of the bytes in the file @throws IOException if an I/O error occurs @since 12.0 @deprecated Prefer {@
(File file, HashFunction hashFunction)
| 619 | * @deprecated Prefer {@code asByteSource(file).hash(hashFunction)}. |
| 620 | */ |
| 621 | @Deprecated |
| 622 | @InlineMe( |
| 623 | replacement = "Files.asByteSource(file).hash(hashFunction)", |
| 624 | imports = "com.google.common.io.Files") |
| 625 | public |
| 626 | static HashCode hash(File file, HashFunction hashFunction) throws IOException { |
| 627 | return asByteSource(file).hash(hashFunction); |
| 628 | } |
| 629 | |
| 630 | /** |
| 631 | * Fully maps a file read-only in to memory as per {@link |