|
Blender V5.3
|
#include <AS_disk_file_hash_service.hh>
Public Member Functions | |
| DiskFileHashService (StringRef storage_path) | |
| ~DiskFileHashService () | |
| std::string | get_hash (StringRef filepath, StringRef hash_algorithm) |
| bool | file_matches (StringRef filepath, StringRef hash_algorithm, StringRef hexhash, int64_t size_in_bytes) |
C++ wrapper around the DiskFileHashService class implemented in Python.
Run the following to see which hash algorithms are supported:
blender -b --python-expr "import hashlib; print(hashlib.algorithms_available)"
Definition at line 29 of file AS_disk_file_hash_service.hh.
|
explicit |
Definition at line 30 of file disk_file_hash_service.cc.
| blender::asset_system::DiskFileHashService::~DiskFileHashService | ( | ) |
Definition at line 35 of file disk_file_hash_service.cc.
| bool blender::asset_system::DiskFileHashService::file_matches | ( | StringRef | filepath, |
| StringRef | hash_algorithm, | ||
| StringRef | hexhash, | ||
| int64_t | size_in_bytes ) |
Check the file on disk, to see if it matches the given properties.
Definition at line 112 of file disk_file_hash_service.cc.
References blender::BLI_assert(), blender::BPY_run_string_exec_with_locals_return_idprop(), C, CLOG_ERROR, blender::bke::idprop::create_group(), blender::IDP_AddToGroup(), IDP_bool_get, blender::IDP_BOOLEAN, blender::IDP_FreeProperty(), blender::IDP_NewInt(), blender::IDP_NewString(), LOG, blender::IDProperty::type, and UNUSED_VARS.
| std::string blender::asset_system::DiskFileHashService::get_hash | ( | StringRef | filepath, |
| StringRef | hash_algorithm ) |
Return the hash of a file on disk.
Definition at line 56 of file disk_file_hash_service.cc.
References blender::BPY_run_string_exec_with_locals_return_idprop(), C, CLOG_ERROR, blender::bke::idprop::create_group(), blender::IDP_AddToGroup(), blender::IDP_FreeProperty(), blender::IDP_NewString(), blender::IDP_STRING, IDP_string_get, LOG, blender::IDProperty::type, and UNUSED_VARS.