directory-checksum function