Blender V5.3
AS_disk_file_hash_service.hh
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2025 Blender Authors
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
8
9#pragma once
10
11#include "BLI_string_ref.hh"
12
13#include <memory>
14#include <string>
15
16namespace blender {
17struct bContext;
18}
19
20namespace blender::asset_system {
21
30 private:
31 std::string storage_path_;
32
33 public:
34 explicit DiskFileHashService(StringRef storage_path);
36
38 std::string get_hash(StringRef filepath, StringRef hash_algorithm);
39
41 bool file_matches(StringRef filepath,
42 StringRef hash_algorithm,
43 StringRef hexhash,
44 int64_t size_in_bytes);
45
46 private:
48 void release_python();
49};
50
54std::unique_ptr<DiskFileHashService> disk_file_hash_service_get(StringRef storage_path);
55
56} // namespace blender::asset_system
bool file_matches(StringRef filepath, StringRef hash_algorithm, StringRef hexhash, int64_t size_in_bytes)
std::string get_hash(StringRef filepath, StringRef hash_algorithm)
std::unique_ptr< DiskFileHashService > disk_file_hash_service_get(StringRef storage_path)
BMesh Iterators.
__int64 int64_t
Definition BKE_text.h:90