Generating the .manifest files
generate_manifest system alg dir scans
dir and return the contents of the generated manifest.
If the directory contains a .manifest file at the top level, it is ignored.
Generate the final overall hash value of the manifest.
Writes a .manifest file into 'dir', and returns the digest. You should call Stores.fixup_permissions before this to ensure that the permissions are correct. On exit, dir itself has mode 555. Subdirectories are not changed.
Ensure that directory 'dir' generates the given digest.
Filename.basename dir) For a non-error return:
Copy directory source to be a subdirectory of target if it matches the required_digest. manifest_data is normally source/.manifest. source and manifest_data are not trusted (will typically be under the control of another user). The copy is first done to a temporary directory in target, then renamed to the final name only if correct. Therefore, an invalid 'target/required_digest' will never exist. A successful return means than target/required_digest now exists (whether we created it or not).