DoxigAlpha

addFilePath

Add a file as a dependency of process being cached. When hit is called, the file's contents will be checked to ensure that it matches the contents from previous times.

Max file size will be used to determine the amount of space the file contents are allowed to take up in memory. If max_file_size is null, then the contents will not be loaded into memory.

Returns the index of the entry in the files array list. You can use it to access the contents of the file after calling hit() like so:

var file_contents = cache_hash.files.keys()[file_index].contents.?;

Function parameters

Parameters

#
m:*Manifest
max_file_size:?usize

Type definitions in this namespace

Types

#

Functions in this namespace

Functions

#
obtain
Be sure to call `Manifest.deinit` after successful initialization.
readSmallFile
On operating systems that support symlinks, does a readlink.
writeSmallFile
On operating systems that support symlinks, does a symlink.

This is 128 bits - Even with 2^54 cache entries, the probably of a collision would be under 10^-6

Values

#
bin_digest_len
This is 128 bits - Even with 2^54 cache entries, the probably of a collision would be under 10^-6
hex_digest_len
= bin_digest_len * 2
hasher_init
Initial state with random bytes, that can be copied.

Source

Implementation

#
pub fn addFilePath(m: *Manifest, file_path: Path, max_file_size: ?usize) !usize {
    return addOpenedFile(m, file_path, null, max_file_size);
}